home *** CD-ROM | disk | FTP | other *** search
/ The Net Power 1996 November / The Net Power 1996-11.iso / mac / htmled / ActiveX / SAMPLES / SOLITAIR / SOL.ALX < prev    next >
Text File  |  1996-09-08  |  94KB  |  2,686 lines

  1.  
  2. <SCRIPT LANGUAGE="VBScript">
  3. <!--
  4.  
  5. 'The naming conventions for each of the areas where
  6. ' cards can play are:
  7. '    
  8. '    Shuffle Stack        Place where cards are ALL face down 
  9. '                 and the user can click to put cards into
  10. '                 play. Both 3 card and 1 card deal are supported.
  11. '                 (to change number of cards played
  12. '                  change the value of gCOUNTDEAL)
  13. '                 There is only 1 Shuffle Stack.
  14. '
  15. '    Discard Stack        Place where cards are face up
  16. '                 and can be dragged to an Ace Stack
  17. '                 or a Card Stack. There is only 1 Discard Stack.
  18. '
  19. '    Ace Stack        Place where cards of the same suit
  20. '                 are piled, starting with the Ace and Ending
  21. '                 with the King. When all kings are showing
  22. '                 the game is over and the animation begins.
  23. '                 There are 4 Ace Stacks.
  24. '
  25. '    Card Stack        Place where cards are piled, alternating the
  26. '                 the suit and in descending order.
  27. '                 There are 7 card stacks.
  28.  
  29. 'The following global variables are used for this application.
  30. 'Before each variable is information explaining how to use it,
  31. 'as well as explanatory text on the question that the variable 
  32. 'answers (Boolean) or a statement describing the variable's use.
  33. '
  34. 'The variable naming conventions used in this
  35. ' application are represented by: [g][r]vartypeVarName
  36. ' Where:
  37. '     [g]        Denotes it as a global variable.
  38. '     [r]        Denotes it as an array (region).
  39. '     vartype    One of the values specified below.
  40. '     VarName    Name of variable, starting each word 
  41. '             with a capital letter.
  42. '            Using a VARNAME in ALL uppercase
  43. '            will denote it as a constant value.
  44. '
  45. ' vartype can be:
  46. '    d    Decimal number, numeric and non-integer.
  47. '    b    Boolean.
  48. '    int    Integer.
  49. '    inc    Incrementer (Used when doing things, like animations
  50. '                 in steps or increments).
  51. '    str    String.
  52. '    obj    Object or Control.
  53. '    
  54. '    NOTE: Since all data types in VBScript are Variants,
  55. '    this variable convention is for documentation and
  56. '    to help you with debugging and programming.
  57. '
  58.  
  59. 'Are we in debug mode?
  60. dim gbDebug
  61.  
  62. 'Did the mouseup event happen so 
  63. ' we can stop dragging a card?
  64. dim gbMouseUp
  65.  
  66. 'Number of MouseMove(s) to skip before actually
  67. ' redrawing a card (makes the drag seem faster).
  68. dim gintDragSkip
  69.  
  70. 'Did the user want to End the game?
  71. dim gbEndGame
  72.  
  73. 'Done with bouncing all cards off screen.
  74. dim gbAnimationDone 
  75.  
  76. 'Was the background clicked during card animation?
  77. dim gbLeaveEarly
  78.  
  79. 'Number of moves the card will take to get to the ace
  80. ' Stack during animation
  81. dim gincCardMoveSteps
  82.  
  83. 'Current card being moved.
  84. dim gobjCurMoveCard
  85.  
  86. 'Amount to move left of card on each step.
  87. dim gincEndLeft
  88.  
  89. 'Amount to move top of card on each step.
  90. dim gincEndTop
  91.  
  92. 'Order the suits appear on the Ace Stacks.
  93. dim gstrSuitOrder
  94.  
  95. 'Stack the cards are currently being moved to
  96. dim gintCurStackToMove
  97.  
  98. 'Done moving cards to Ace Stack.
  99. dim gbCardMoveDone 
  100.  
  101. 'Is the shuffling done yet?
  102. dim gbShuffleDone
  103.  
  104. 'The array to hold the randomly shuffled cards.
  105. dim grintShuffled(52)
  106.  
  107. 'Number of times to go into the random sequence.
  108. dim gRNDCOUNT
  109.  
  110. 'For the End game
  111. 'Each card that is currently bouncing and the 
  112. ' top and left value for each.
  113. dim grCardBouncing(4,3)
  114.  
  115. 'Which cards are done moving.
  116. dim gbDoneMoving(4)
  117.  
  118. 'Friction and gravity valued applied to each bounce.
  119. dim gdFriction
  120. dim gdGravity
  121.  
  122. 'Used for the count of cards to deal.
  123. dim gCOUNTDEAL
  124.  
  125. 'Number of cards moved to Discard Stack when a user clicks the
  126. ' Shuffle Stack.  Needed to determine how many cards should
  127. ' be showing on the Discard Stack.
  128. dim gintCountDiscarded
  129.  
  130. 'Stack the card is being moved from.
  131. dim gintSrcStack
  132.  
  133. 'Used during animation. These variables
  134. ' store the starting position of each card and
  135. ' the End points of where the card
  136. ' should End up after being moved.
  137. dim gdStartTop, gdStartLeft
  138. dim gdCardTop, gdCardLeft
  139. dim gdOffsetTop
  140.  
  141. 'Card being moved.
  142. dim gintMoveCardInx
  143.  
  144. 'Number of total cards being moved during a mouse
  145. ' drag, i.e., moving cards from one stack to another.
  146. dim gintCountMoving
  147.  
  148. 'Holds all the cards of the deck.
  149. dim grobjAllCards(52) 
  150.  
  151. 'Is the card face up?
  152. dim grbCardShowing(52)
  153.  
  154. 'Current deck being displayed.
  155. dim gintCurDeck
  156.  
  157. 'Current deck being displayed in the dialog.
  158. dim gintTempCurDeck
  159.  
  160. 'Holds all the card backs to be displayed later.
  161. dim grobjCardDeck(12)
  162.  
  163. 'Used when comparing with a King or Ace.
  164. dim gACE 
  165. dim gKING
  166.  
  167. 'Starting index into stack array of Shuffle Stack.
  168. dim gintShuffleStackInx
  169.  
  170. 'Starting index into stack array of Discard Stack.
  171. dim gintDiscardStackInx
  172.  
  173. 'Starting index into stack array of first Ace Stack
  174. dim gintAceStackStartInx 
  175.  
  176. 'This encompasses all 7 Card Stacks, 4 Ace Stacks,
  177. ' Shuffle Stack and Discard Stack.
  178. 'This array contains 30 items in each stack because 28 is 
  179. ' the maximum number of cards that could be in one stack
  180. ' plus two spaces for other info.
  181. ' The first dimension of the array determines which
  182. ' stack to use and the second dimension is what is on
  183. ' the stack. The first element in each stack is the
  184. ' stack object, the second element is the count of 
  185. ' elements and the third element onward is where the cards are stored.
  186. dim grobjAllCardStacks(13,30) 
  187.  
  188. 'Value of the bottom of the stack, empty stack.
  189. dim gstrBOTTOMOFSTACK 
  190.  
  191. 'Count of the total number of stacks used.
  192. dim gintCountAllStacks
  193.  
  194. 'Total number of card stacks (7).
  195. dim gintCountCardStacks
  196.  
  197. 'Number of pixels used between each card when
  198. ' being drawn.
  199. dim gintCardOffset
  200.  
  201. -->
  202. </SCRIPT>
  203. <SCRIPT LANGUAGE="VBScript">
  204. <!--
  205. '**********************************************
  206. '* Name: DebugPrint
  207. '**********************************************
  208. '* Description:
  209. '*    Provides a utility Function that displays
  210. '*     the string sent to it in a debug
  211. '*     "window." Currently, a listbox control
  212. '*     is used to display debug output.
  213. '*     Feel free to call this Function during
  214. '*     debugging. 
  215. '*    NOTE: Does depEnd on the existence of a 
  216. '*     listbox with the ID of lstDebugPrint
  217. '**********************************************
  218. '* Parameters:
  219. '*    str        String displayed to debug window
  220. '**********************************************
  221. Sub DebugPrint(str)
  222.     If gbDebug then
  223.         lstDebugPrint.additem str
  224.     END IF
  225. End Sub 'DebugPrint
  226.  
  227. '**********************************************
  228. '* Name: OnLoad event for ActiveX Layout
  229. '**********************************************
  230. '* Description:
  231. '*    Sets up the default values and
  232. '*     calls startgame to get things going.
  233. '**********************************************
  234. '* Parameters:
  235. '*    None
  236. '**********************************************
  237. Sub Form_OnLoad()
  238.     'Turn debug mode off
  239.     gbDebug = false
  240.     'Allow the user a checkbox for changing debug mode
  241.     chkDebug.value = gbDebug
  242.  
  243.     Form.DrawBuffer = "256000"
  244.     gACE = 1
  245.     gKING = 13
  246.     gCOUNTDEAL = 3
  247.  
  248.     gdFriction = 2
  249.     gdGravity = 9.8
  250.  
  251.       gstrBOTTOMOFSTACK = "BOS"
  252.  
  253.     'Spacing when drawing a card
  254.     gintCardOffset = 11
  255.   
  256.     gintShuffleStackInx = 12
  257.     gintDiscardStackInx = 13
  258.       gintCountCardStacks = 7
  259.     gintAceStackStartInx = gintCountCardStacks+1
  260.  
  261.     gintCountAllStacks = 13
  262.  
  263.     StartGame  
  264. End Sub 'Form_OnLoad
  265.  
  266. '**********************************************
  267. '* Name: StartGame
  268. '**********************************************
  269. '* Description:
  270. '*    Gets the game going by setting up
  271. '*     the card back and shuffling and dealing 
  272. '*     the cards.
  273. '**********************************************
  274. '* Parameters:
  275. '*    None
  276. '**********************************************
  277. Sub StartGame
  278.     gbEndGame = False
  279.     'Values used during animation
  280.     gintDragSkip = 3
  281.     gbCardMoveDone = True
  282.     tmEndAnimation.enabled = false
  283.     tmEndCardMove.enabled = false
  284.     gincCardMoveSteps = 0
  285.     gincEndLeft = 0
  286.     gincEndTop = 0
  287.     gintCountMoving = 0
  288.  
  289.     LoadCards
  290.  
  291.      if gintCurDeck > -1 or gintCurDeck < -12 then
  292.         ChangeTheDeck -1
  293.     end if
  294.  
  295.     gRNDCOUNT = 500
  296.  
  297.     DealCards
  298. End Sub 'StartGame
  299.  
  300. '**********************************************
  301. '* Name: LoadCard
  302. '**********************************************
  303. '* Description:
  304. '*    Loads all the arrays with the card objects.
  305. '*    Initializes grbCardShowing.
  306. '*    Applies default values to the stacks.
  307. '**********************************************
  308. '* Parameters:
  309. '*    None
  310. '**********************************************
  311. Sub LoadCards
  312.     'Could also use a control array here but this
  313.     ' code loads the card objects into the array
  314.     set grobjAllCards(1) = Card1H
  315.     set grobjAllCards(2) = Card2H
  316.     set grobjAllCards(3) = Card3H
  317.     set grobjAllCards(4) = Card4H
  318.     set grobjAllCards(5) = Card5H
  319.     set grobjAllCards(6) = Card6H
  320.     set grobjAllCards(7) = Card7H
  321.     set grobjAllCards(8) = Card8H
  322.     set grobjAllCards(9) = Card9H
  323.     set grobjAllCards(10) = Card10H
  324.     set grobjAllCards(11) = Card11H
  325.     set grobjAllCards(12) = Card12H
  326.     set grobjAllCards(13) = Card13H
  327.     set grobjAllCards(14) = Card1D
  328.     set grobjAllCards(15) = Card2D
  329.     set grobjAllCards(16) = Card3D
  330.     set grobjAllCards(17) = Card4D
  331.     set grobjAllCards(18) = Card5D
  332.     set grobjAllCards(19) = Card6D
  333.     set grobjAllCards(20) = Card7D
  334.     set grobjAllCards(21) = Card8D
  335.     set grobjAllCards(22) = Card9D
  336.     set grobjAllCards(23) = Card10D
  337.     set grobjAllCards(24) = Card11D
  338.     set grobjAllCards(25) = Card12D
  339.     set grobjAllCards(26) = Card13D
  340.     set grobjAllCards(27) = Card1C
  341.     set grobjAllCards(28) = Card2C
  342.     set grobjAllCards(29) = Card3C
  343.     set grobjAllCards(30) = Card4C
  344.     set grobjAllCards(31) = Card5C
  345.     set grobjAllCards(32) = Card6C
  346.     set grobjAllCards(33) = Card7C
  347.     set grobjAllCards(34) = Card8C
  348.     set grobjAllCards(35) = Card9C
  349.     set grobjAllCards(36) = Card10C
  350.     set grobjAllCards(37) = Card11C
  351.     set grobjAllCards(38) = Card12C
  352.     set grobjAllCards(39) = Card13C
  353.     set grobjAllCards(40) = Card1S
  354.     set grobjAllCards(41) = Card2S
  355.     set grobjAllCards(42) = Card3S
  356.     set grobjAllCards(43) = Card4S
  357.     set grobjAllCards(44) = Card5S
  358.     set grobjAllCards(45) = Card6S
  359.     set grobjAllCards(46) = Card7S
  360.     set grobjAllCards(47) = Card8S
  361.     set grobjAllCards(48) = Card9S
  362.     set grobjAllCards(49) = Card10S
  363.     set grobjAllCards(50) = Card11S
  364.     set grobjAllCards(51) = Card12S
  365.     set grobjAllCards(52) = Card13S
  366.  
  367.  
  368.     'Make all cards transparent
  369.     ClearAllCards
  370.  
  371.     'Load up the card stacks
  372.     set grobjAllCardStacks(gintShuffleStackInx,1)= Shuffle
  373.     set grobjAllCardStacks(gintDiscardStackInx,1)= Discard
  374.  
  375.     set grobjAllCardStacks(1,1) = Stack1
  376.     set grobjAllCardStacks(2,1) = Stack2
  377.     set grobjAllCardStacks(3,1) = Stack3
  378.     set grobjAllCardStacks(4,1) = Stack4
  379.     set grobjAllCardStacks(5,1) = Stack5
  380.     set grobjAllCardStacks(6,1) = Stack6
  381.     set grobjAllCardStacks(7,1) = Stack7
  382.  
  383.     for inx = 1 to gintCountAllStacks
  384.         grobjAllCardStacks(inx,2) = 0
  385.     next 
  386.  
  387.     set grobjAllCardStacks(gintAceStackStartInx,1) = Ace1
  388.     set grobjAllCardStacks(gintAceStackStartInx+1,1) = Ace2
  389.     set grobjAllCardStacks(gintAceStackStartInx+2,1) = Ace3
  390.     set grobjAllCardStacks(gintAceStackStartInx+3,1) = Ace4
  391.  
  392.  
  393.     'Setup initial stack size by setting to the size of a card object.
  394.     ' Don't use default Discard Stack because is hardcoded.
  395.     for inx = 1 to gintCountAllStacks - 1
  396.         grobjAllCardStacks(inx,1).height = grobjAllCards(1).height
  397.         grobjAllCardStacks(inx,1).width = grobjAllCards(1).width
  398.     next
  399.  
  400.     set grobjCardDeck(1) = CardDeck1
  401.     set grobjCardDeck(2) = CardDeck2
  402.     set grobjCardDeck(3) = CardDeck3
  403.     set grobjCardDeck(4) = CardDeck4
  404.     set grobjCardDeck(5) = CardDeck5
  405.     set grobjCardDeck(6) = CardDeck6
  406.     set grobjCardDeck(7) = CardDeck7
  407.     set grobjCardDeck(8) = CardDeck8
  408.     set grobjCardDeck(9) = CardDeck9
  409.     set grobjCardDeck(10) = CardDeck10
  410.     set grobjCardDeck(11) = CardDeck11
  411.     set grobjCardDeck(12) = CardDeck12
  412.  
  413. End Sub 'LoadCard
  414.  
  415. '**********************************************
  416. '* Name: ChangeTheDeck
  417. '**********************************************
  418. '* Description:
  419. '*    Changes the current deck being used.
  420. '**********************************************
  421. '* Parameters:
  422. '*    DeckID    New card deck to be displayed.
  423. '*            Current value of deck is stored
  424. '*            in gintCurDeck.
  425. '**********************************************
  426. Sub ChangeTheDeck (DeckID)
  427.     'The deck back didn't change so don't redo it.
  428.     If gintCurDeck = DeckID then
  429.         exit Sub
  430.     End If
  431.     'Deck is new, let's change all the cards that need it.
  432.     gintCurDeck = DeckID
  433.  
  434.     for StackInx = 1 to gintCountAllStacks
  435.         for inner = 1 to intCountOnStack(StackInx)
  436.             strCard = strGetStackElement(StackInx,inner)
  437.             intCardInx = intGetCardIndex(strCard)
  438.             If not grbCardShowing(intCardInx) then
  439.                 'Redraw the cards that are not face up.
  440.                 DrawCard intCardInx
  441.             End If
  442.         next
  443.     next 
  444. End Sub 'ChangeTheDeck
  445.  
  446. '**********************************************
  447. '* Name: ClearAllCards
  448. '**********************************************
  449. '* Description:
  450. '*    Sets all card objects to their transparent
  451. '*     value.
  452. '**********************************************
  453. '* Parameters:
  454. '*    None
  455. '**********************************************
  456. Sub ClearAllCards
  457.     for inx = 1 to 52
  458.         grobjAllCards(inx).Suite = 0
  459.         grobjAllCards(inx).Visible = True
  460.     next 
  461. End Sub 'ClearAllCards
  462.  
  463. '**********************************************
  464. '* Name: Push
  465. '**********************************************
  466. '* Description:
  467. '*    Pushes (adds) a card object to a stack.
  468. '**********************************************
  469. '* Parameters:
  470. '*    intStack    Stack to add card to
  471. '*    strCard    Card to add
  472. '**********************************************
  473. Sub Push(intStack, strCard)
  474.     dim intNewSize
  475.  
  476.     If gstrBOTTOMOFSTACK <> strTopOfStack(intStack) then
  477.         grobjAllCardStacks(intStack,1).height = grobjAllCardStacks(intStack,1).height + intGetVertOffset(intStack)
  478. '        grobjAllCardStacks(intStack,1).width = grobjAllCardStacks(intStack,1).width + intGetHorzOffset(intStack)
  479.     End If
  480.  
  481.     intNewSize = grobjAllCardStacks(intStack,2)+1
  482.     grobjAllCardStacks(intStack,2) = intNewSize
  483.     grobjAllCardStacks(intStack,intNewSize+2) = strCard
  484.  
  485.     'This makes all cards but the top two invisible so drawing of the stack
  486.     ' is much faster
  487.     if intNewSize > 2 and _
  488.        (intStack >= gintAceStackStartInx and intStack <= gintAceStackStartInx+3) then
  489.         CardIndex = intGetCardIndex(grobjAllCardStacks(intStack,intNewSize+2-2))
  490.         grobjAllCards(CardIndex).visible = false
  491.     end if
  492.  
  493. End Sub 'Push    
  494.  
  495.  
  496. '**********************************************
  497. '* Name: strPop
  498. '**********************************************
  499. '* Description:
  500. '*    Returns the string representation of
  501. '*     the card at the top of the stack and
  502. '*     removes it from the top.
  503. '**********************************************
  504. '* Parameters:
  505. '*    intStack    Stack to strPop card off of
  506. '**********************************************
  507. Function strPop(intStack)
  508.     strCard = strTopOfStack(intStack)
  509.  
  510.     If gstrBOTTOMOFSTACK = strCard then
  511.         strPop = gstrBOTTOMOFSTACK
  512.         exit Function
  513.     End If
  514.  
  515.     pos = grobjAllCardStacks(intStack,2)
  516.  
  517.     'This unhides the cards that were hidden in Sub Push
  518.     if pos > 2 and _
  519.        (intStack >= gintAceStackStartInx and intStack <= gintAceStackStartInx+3) then
  520.         CardIndex = intGetCardIndex(grobjAllCardStacks(intStack,pos+2-2))
  521.         grobjAllCards(CardIndex).visible = true
  522.     end if
  523.  
  524.     strPop = grobjAllCardStacks(intStack,pos+2)
  525.     grobjAllCardStacks(intStack,2) = pos-1
  526.  
  527.     grobjAllCardStacks(intStack,1).height = grobjAllCardStacks(intStack,1).height - intGetVertOffset(intStack)
  528. '    grobjAllCardStacks(intStack,1).width = grobjAllCardStacks(intStack,1).width - intGetHorzOffset(intStack)
  529.  
  530. End Function 'Pop
  531.  
  532. '**********************************************
  533. '* Name: strGetStackElement
  534. '**********************************************
  535. '* Description:
  536. '*    Internal Stack function used to get
  537. '*     elements that are not on the top or the
  538. '*     bottom of the stack.
  539. '**********************************************
  540. '* Parameters:
  541. '*    intStack    Stack to get it from
  542. '*    intElement    Position of element
  543. '**********************************************
  544. Function strGetStackElement(intStack,intElement)
  545.     strGetStackElement = gstrBOTTOMOFSTACK
  546.     If Element <= intCountOnStack(intStack) then
  547.         strGetStackElement = grobjAllCardStacks(intStack,intElement+2)
  548.     End If
  549. End Function 'strGetStackElement
  550.  
  551. '**********************************************
  552. '* Name: strTopOfStack
  553. '**********************************************
  554. '* Description:
  555. '*    Returns the string value of the card
  556. '*    on the top of the stack. Does NOT
  557. '*    remove the card from the stack.
  558. '**********************************************
  559. '* Parameters:
  560. '*    intStack    Stack to get card from
  561. '**********************************************
  562. Function strTopOfStack(intStack)
  563.     strTopOfStack = gstrBOTTOMOFSTACK
  564.     If 0 < intCountOnStack(intStack) then
  565.         Pos = intCountOnStack(intStack)
  566.         strTopOfStack = grobjAllCardStacks(intStack,Pos+2)
  567.     End If
  568. End Function 'strTopOfStack
  569.  
  570. '**********************************************
  571. '* Name: strGenerateCard
  572. '**********************************************
  573. '* Description:
  574. '*    Generates a card randomly. If the deck has
  575. '*     not been shuffled yet, they will be.
  576. '**********************************************
  577. '* Parameters:
  578. '*    intCardCount    Card to get
  579. '**********************************************
  580. Function strGenerateCard(intCardCount)
  581.     dim rSorted(52)
  582.     'Shuffle the stack if not already done.
  583.     If not gbShuffleDone then
  584.         Randomize 
  585.         'Go a random number of elements into the sequence.
  586.         for inx = 1 to (gRNDCOUNT * rnd())
  587.         next
  588.  
  589.         'Load the unsorted array.
  590.         for inx = 1 to 52
  591.             rSorted(inx-1) = inx
  592.         next
  593.  
  594.         'Load a shuffled card into the array.
  595.         for inx = 0 to 51
  596.             random = cint(rnd() * (51 - inx))
  597.             grintShuffled(inx+1) = rSorted(random)
  598.             rSorted(random) = rSorted(51 - inx)
  599.         next
  600.         gbShuffleDone = true
  601.     End If
  602.     intCardNum = grintShuffled(intCardCount)
  603.     strGenerateCard = strInxToCard(intCardNum)
  604. End Function 'strGenerateCard
  605.  
  606. '**********************************************
  607. '* Name: strInxToCard
  608. '**********************************************
  609. '* Description:
  610. '*    Converts a card number (index) to its
  611. '*     string representation.
  612. '**********************************************
  613. '* Parameters:
  614. '*    intCardNum    Value of card
  615. '**********************************************
  616. Function strInxToCard(intCardNum)
  617.     inxSuit = 0
  618.     
  619.     intCurCardNum = intCardNum
  620.     while 13 < intCurCardNum
  621.         intCurCardNum = intCurCardNum - 13
  622.         inxSuit = inxSuit + 1
  623.     wEnd
  624.     Select Case inxSuit
  625. 'Clubs, Spades, Hearts and Diamonds is the current order
  626. ' of Suits.
  627. 'Order in Card.ocx is dependent on suit order.
  628.     case 0
  629.         strSuit = "C"
  630.     case 1
  631.         strSuit = "S"
  632.     case 2
  633.         strSuit = "H"
  634.     case 3
  635.         strSuit = "D"
  636.     case Else
  637.         debugPrint "Error (strInxToCard): attempting to increment suit past last one"
  638.     End select
  639.  
  640.     strCurCard = intCurCardNum & strSuit
  641.     strInxToCard = strCurCard
  642. End Function 'strInxToCard
  643.  
  644. '**********************************************
  645. '* Name: strGetCardSuit
  646. '**********************************************
  647. '* Description:
  648. '*    Returns the suit of a card.
  649. '**********************************************
  650. '* Parameters:
  651. '*    strCard    Card to get the suit of.
  652. '**********************************************
  653. Function strGetCardSuit(strCard)
  654.     strGetCardSuit = ""
  655.     If "" = strCard then
  656.         exit Function
  657.     End If
  658.  
  659.     strGetCardSuit = right(strCard,1)
  660. End Function 'strGetCardSuit
  661.  
  662. '**********************************************
  663. '* Name: intGetCardIndex
  664. '**********************************************
  665. '* Description:
  666. '*    Returns the position, (index) into the
  667. '*      AllCards array of where the card is.
  668. '**********************************************
  669. '* Parameters:
  670. '*    strCard    Card to find index of.
  671. '**********************************************
  672. Function intGetCardIndex(strCard)
  673.     If "" = strCard or gstrBOTTOMOFSTACK = strCard then
  674.         intGetCardIndex = -1
  675.         exit Function
  676.     End If
  677.     strSuit = right(strCard,1)
  678. 'Order in Card.ocx is dependent on suit order.
  679.     Select case strSuit
  680.     case "H"
  681.         Offset = 26
  682.     case "D"
  683.         Offset = 39
  684.     case "S"
  685.         Offset = 13
  686.     case "C"
  687.         Offset = 0
  688.     End Select
  689.  
  690.     intGetCardIndex = Offset + intCardVal(strCard)
  691. End Function 'intGetCardIndex
  692.  
  693. '**********************************************
  694. '* Name: intCardVal
  695. '**********************************************
  696. '* Description:
  697. '*    Returns the numeric value of a given card,
  698. '*     independent of suit.
  699. '*     Ex: 10 of Hearts is "10H" and the value
  700. '*     returned would be 10.
  701. '**********************************************
  702. '* Parameters:
  703. '*    strCard    Card to get value of.
  704. '**********************************************
  705. Function intCardVal(strCard)
  706.     dim tmpVal
  707.     If "" = strCard or gstrBOTTOMOFSTACK = strCard then
  708.         tmpVal = -1
  709.     Else
  710.         tmpVal = left(strCard,len(strCard) -1)
  711.     End If
  712.     intCardVal = cint(tmpVal)
  713. End Function 'intCardVal
  714.  
  715. '**********************************************
  716. '* Name: bSameSuit
  717. '**********************************************
  718. '* Description:
  719. '*    Returns:
  720. '*       True    if cards are the same suit.
  721. '*      False    if suits are different.
  722. '**********************************************
  723. '* Parameters:
  724. '*    strCard1    First card.
  725. '*    strCard2    Card to compare against first card.
  726. '**********************************************
  727. Function bSameSuit(strCard1,strCard2)
  728.     'Get the values of both cards.
  729.     strSuit1 = strGetCardSuit(strCard1)
  730.     strSuit2 = strGetCardSuit(strCard2)
  731.     
  732.     bSameSuit = (strSuit1 = strSuit2)
  733. End Function 'bSameSuit
  734.  
  735. '**********************************************
  736. '* Name: bSameColor
  737. '**********************************************
  738. '* Description:
  739. '*    Returns:
  740. '*        True    if cards are the same color.
  741. '*        False    if cards are different color.
  742. '**********************************************
  743. '* Parameters:
  744. '*    strCard1    First card.
  745. '*    strCard2    Card to compare against first card.
  746. '**********************************************
  747. Function bSameColor(strCard1,strCard2)
  748.  
  749.     strSuit1 = strGetCardSuit(strCard1)
  750.     strSuit2 = strGetCardSuit(strCard2)
  751.  
  752.     'Are they the same suit?
  753.     If (strSuit1 = strSuit2) then
  754.         bSameColor = True
  755.         exit Function
  756.     End If
  757.     'Since both cards don't match suit
  758.     ' check the other suit of that color.
  759.     Select Case strSuit1
  760.     case "H"
  761.         bSameColor = (strSuit2 = "D")
  762.     case "D"
  763.         bSameColor = (strSuit2 = "H")
  764.     case "S"
  765.         bSameColor = (strSuit2 = "C")
  766.     case "C"
  767.         bSameColor = (strSuit2 = "S")
  768.     End select
  769.  
  770. End Function 'bSameColor
  771.  
  772. '**********************************************
  773. '* Name: intGetHorzOffset
  774. '**********************************************
  775. '* Description:
  776. '*    Returns the current horizontal offset
  777. '*    in pixels when drawing the cards on a stack.
  778. '**********************************************
  779. '* Parameters:
  780. '*    intStack    Stack to draw.
  781. '**********************************************
  782. Function intGetHorzOffset(intStack)
  783.     intGetHorzOffset = 0
  784.     'Only the Discard Stack has a horizontal offset.
  785.     If (gintDiscardStackInx = intStack) then
  786.         intGetHorzOffset = gintCardOffset
  787.     End If
  788. End Function 'intGetHorzOffset
  789.  
  790. '**********************************************
  791. '* Name: intGetVertOffset
  792. '**********************************************
  793. '* Description:
  794. '*    Returns the vertical offset, used during
  795. '*    drawing a stack, for a particular stack.
  796. '**********************************************
  797. '* Parameters:
  798. '*    intStack    Stack to return Vertical
  799. '*             offset for.
  800. '**********************************************
  801. Function intGetVertOffset(intStack)
  802.     intGetVertOffset = gintCardOffset
  803.     'HARDCODE ASSUMPTION: ALL Stacks above gintAceStackStartInx WILL have a vert offset of 0
  804.     If (gintAceStackStartInx <= intStack) then
  805.         intGetVertOffset = 0
  806.     End If
  807. End Function 'intGetVertOffset
  808.  
  809. '**********************************************
  810. '* Name: DrawDiscardStack
  811. '**********************************************
  812. '* Description:
  813. '*    The Discard Stack is drawn in this routine
  814. '*    because it is a special case of the draw
  815. '*    routine. The difference being that all 
  816. '*    other stacks draw ALL cards with an offset
  817. '*    and the discard ONLY draws the cards on
  818. '*    the top of its pile with an offset.
  819. '**********************************************
  820. '* Parameters:
  821. '*    None
  822. '**********************************************
  823. Sub DrawDiscardStack
  824.     dim intStartOffset
  825.     dim intStackSize
  826.     dim intCountPiles
  827.     dim intRemainder
  828.  
  829.     'Default Offset Values
  830.     intHorzOffset = intGetHorzOffset(gintDiscardStackInx)
  831.     intVertOffset = intGetVertOffset(gintDiscardStackInx)
  832.  
  833.     intStackSize = intCountOnStack(gintDiscardStackInx)
  834.  
  835.     'See if less than three cards were transferred to Discard Stack.
  836.     intStartOffset = (intStackSize - gintCountDiscarded)
  837.  
  838.     'Draw all underneath cards that won't have an offset.
  839.     for inx = 0 to intStartOffset - 1
  840.         strCard = grobjAllCardStacks(gintDiscardStackInx,inx + 3)
  841.         CardIndex = intGetCardIndex(strCard)
  842.         grobjAllCards(CardIndex).top = grobjAllCardStacks(gintDiscardStackInx,1).top 
  843.         grobjAllCards(CardIndex).left = grobjAllCardStacks(gintDiscardStackInx,1).left 
  844.         DrawCard CardIndex
  845.     next 
  846.     OffsetInx = 0
  847.     'Draw the cards at the top of the Discard Stack.
  848.     for inx = intStartOffset to intStackSize - 1
  849.         strCard = grobjAllCardStacks(gintDiscardStackInx,inx + 3)
  850.         CardIndex = intGetCardIndex(strCard)
  851.         grobjAllCards(CardIndex).top = grobjAllCardStacks(gintDiscardStackInx,1).top  + (OffsetInx * intVertOffset)
  852.         grobjAllCards(CardIndex).left = grobjAllCardStacks(gintDiscardStackInx,1).left + (OffsetInx * intHorzOffset)
  853.         DrawCard CardIndex
  854.         OffsetInx = OffsetInx + 1
  855.         'Bring that card to top of pile.
  856.         grobjAllCards(CardIndex).ZOrder(0)
  857.     next
  858.     'Make sure to bring hotspot stack to top of z order so it can get events.
  859.     grobjAllCardStacks(gintDiscardStackInx,1).ZOrder(0)
  860.  
  861. End Sub 'DrawDiscardStack
  862.  
  863. '**********************************************
  864. '* Name: DrawCard
  865. '**********************************************
  866. '* Description:
  867. '*    Here we draw a card based on the index
  868. '*    sent in.
  869. '*    NOTE: if Card.ocx changes it will most likely
  870. '*    effect code here.
  871. '**********************************************
  872. '* Parameters:
  873. '*    intCardIndex    Index into card array of
  874. '*                 card being drawn.
  875. '**********************************************
  876. Sub DrawCard (CardIndex)
  877.     If True = grbCardShowing(CardIndex) then
  878.  
  879.         'Calculate which suit it was so we
  880.         ' can change it back.
  881.         inxSuit = (CardIndex \ 13)
  882.         inxCard = CardIndex - (inxSuit*13)
  883.         If (0 <> inxCard) then
  884.             inxSuit = inxSuit + 1
  885.         Else
  886.             inxCard = 13
  887.         End If
  888.         grobjAllCards(CardIndex).Number= inxCard
  889.     Else
  890.         'Cards are face down, let's use the current deck.
  891.         inxSuit = gintCurDeck
  892.     End If
  893.     grobjAllCards(CardIndex).Suite= inxSuit
  894. End Sub 'DrawCard
  895.  
  896. '**********************************************
  897. '* Name: DrawStack
  898. '**********************************************
  899. '* Description:
  900. '*    Draws a specific stack by getting the correct
  901. '*     offset and then calling DrawCard.
  902. '**********************************************
  903. '* Parameters:
  904. '*    intStack    Stack to draw.
  905. '**********************************************
  906. Sub DrawStack (intStack)
  907.  
  908.     'Default Offset Values
  909.     intHorzOffset = intGetHorzOffset(intStack)
  910.     intVertOffset = intGetVertOffset(intStack)
  911.     If 0 = intCountOnStack(intStack) then Exit Sub
  912.  
  913.     If (gintDiscardStackInx = intStack) then
  914.         DrawDiscardStack
  915.         exit Sub
  916.     End If
  917.  
  918.     for inx = 1 to intCountOnStack(intStack)
  919.     'This cycles through all the cards in the stack applying an offset.
  920.         strCard = grobjAllCardStacks(intStack,inx + 2)
  921.         intCardIndex = intGetCardIndex(strCard)
  922.         grobjAllCards(intCardIndex).top = grobjAllCardStacks(intStack,1).top + ((inx-1) * intVertOffset)
  923.         grobjAllCards(intCardIndex).left = grobjAllCardStacks(intStack,1).left + ((inx-1) * intHorzOffset)
  924.  
  925.         DrawCard intCardIndex
  926.     next
  927.     If (0 < intCardIndex) then 
  928.         grobjAllCards(intCardIndex).ZOrder(0)
  929.         grobjAllCardStacks(intStack,1).ZOrder(0)
  930.     End If
  931. End Sub 'DrawStack
  932.  
  933. '**********************************************
  934. '* Name: DealCards
  935. '**********************************************
  936. '* Description:
  937. '*    Here we deal the cards to each of the
  938. '*    7 card stacks and put the rest into
  939. '*    the Shuffle Stack.
  940. '**********************************************
  941. '* Parameters:
  942. '*    NONE
  943. '**********************************************
  944. Sub DealCards
  945.     'The first time calling GenerateCard we have
  946.     ' to be sure it shuffles the deck.
  947.     gbShuffleDone = false
  948.     intCardCount = 1
  949.  
  950.     'This set of loops will deal the cards
  951.     ' needed to the 7 stacks.
  952.     for inxStack = 1 to gintCountCardStacks
  953.         For inx = 1 to inxStack
  954.             strCard = strGenerateCard(intCardCount)
  955.             'Push on the new card.
  956.             Push inxStack,strCard
  957.             intCardInx = intGetCardIndex(strCard)
  958.             grbCardShowing(intCardInx) = False
  959.             intCardCount = intCardCount +1
  960.             grobjAllCards(intCardInx).Zorder(0)
  961.         next 
  962.         'Only show the top card on the stack.
  963.         grbCardShowing(intCardInx) = True
  964.         DrawStack inxStack
  965.     next 
  966.  
  967.     'Give the rest to the Shuffle Stack.
  968.     for Card = intCardCount to 52
  969.         strCard = strGenerateCard(Card)
  970.         push gintShuffleStackInx, strCard
  971.         intCardInx = intGetCardIndex(strCard)
  972.         grbCardShowing(intCardInx) = false
  973.         grobjAllCards(intCardInx).Zorder(0)
  974.     next
  975.     DrawStack gintShuffleStackInx
  976. End Sub 'DealCards
  977.  
  978. '**********************************************
  979. '* Name: DoDblClick
  980. '**********************************************
  981. '* Description:
  982. '*    Here is where all double-clicking of
  983. '*      a card is processed. The double-click
  984. '*     allows a card to be put on an Ace Stack,
  985. '*     if the move is valid, with the 
  986. '*     top card on the stack clicked.
  987. '**********************************************
  988. '* Parameters:
  989. '*    intStack    The stack that was double-clicked.
  990. '**********************************************
  991. Sub DoDblClick(intStack)
  992.     'If Valid Move then move it.
  993.     intAceInx = gintAceStackStartInx
  994.     bMoved = false
  995.  
  996.     strCard = strTopOfStack(intStack)
  997.     If (gstrBOTTOMOFSTACK = strCard) then Exit Sub
  998.  
  999.     'Until we find a valid move or run out of Ace Stacks to check.
  1000.     While intAceInx < gintAceStackStartInx + 4 and not bMoved
  1001.         bMoved = bIsLegalMove(intStack,intAceInx,strCard)
  1002.         intAceInx = intAceInx + 1
  1003.     wEnd
  1004.  
  1005.     If bMoved then
  1006.         gintSrcStack = intStack
  1007.         MoveCard intAceInx -1
  1008.     End If
  1009.     'Turn off the moving of a card.
  1010.     gintMoveCardInx = -1
  1011. End Sub 'DoDblClick
  1012.  
  1013. '**********************************************
  1014. '* Name: ShuffleClicked
  1015. '**********************************************
  1016. '* Description:
  1017. '*    When the Shuffle Stack is clicked we
  1018. '*    must either put some cards on the
  1019. '*    Discard Stack, or if the Shuffle Stack is empty
  1020. '*    move all the cards from the Discard Stack.
  1021. '**********************************************
  1022. '* Parameters:
  1023. '*    intStack    Should be the Shuffle Stack.
  1024. '**********************************************
  1025. Sub ShuffleClicked(intStack)
  1026.     dim strCard
  1027.     dim inx
  1028.     'Do we actually have cards to move?
  1029.     If gstrBOTTOMOFSTACK <> strTopOfStack(intStack) then
  1030.         inx = 0
  1031.         strCard = strPop(intStack)
  1032.         'Move cards to Discard Stack until we are out of cards or
  1033.         ' hit the number we wanted to move.
  1034.         while (gCOUNTDEAL > inx) and (gstrBOTTOMOFSTACK <> strCard)
  1035.             Push gintDiscardStackInx, strCard
  1036.             intCardInx = intGetCardIndex(strCard)
  1037.             If -1 <> intCardInx then grbCardShowing(intCardInx) = True
  1038.             inx = inx + 1
  1039.             strCard = strPop(intStack)
  1040.         Wend
  1041.         If (gCOUNTDEAL = inx ) and (gstrBOTTOMOFSTACK <> strCard) then Push intStack,strCard
  1042.         gintCountDiscarded = inx
  1043.     Else
  1044.         'No more to move so let's move discard back to shuffle.
  1045.         for inx = 1 to intCountOnStack(gintDiscardStackInx)
  1046.             strCard = strPop(gintDiscardStackInx)
  1047.             Push intStack,strCard
  1048.             intCardInx = intGetCardIndex(strCard)
  1049.             grbCardShowing(intCardInx) = False
  1050.         next 
  1051.         DrawStack intStack
  1052.         gintCountDiscarded = 0
  1053.     End If
  1054.     DrawStack gintDiscardStackInx
  1055. End Sub 'ShuffleClicked
  1056.  
  1057. '**********************************************
  1058. '* Name: intCountOnStack
  1059. '**********************************************
  1060. '* Description:
  1061. '*    Returns number of elements on stack given.
  1062. '**********************************************
  1063. '* Parameters:
  1064. '*    intStack    Stack to get number from.
  1065. '**********************************************
  1066. Function intCountonStack(intStack)
  1067.     intCountOnStack = grobjAllCardStacks(intStack,2)
  1068. End Function
  1069.  
  1070. '**********************************************
  1071. '* Name: SetMoveStartValues
  1072. '**********************************************
  1073. '* Description:
  1074. '*    This is the first function called in the 
  1075. '*     action of moving a card. This is where
  1076. '*     the MouseDown events call to so stated
  1077. '*     variables can be initialized.
  1078. '*     Also the top and left start positions
  1079. '*     are set up here for the card drag.
  1080. '*    
  1081. '**********************************************
  1082. '* Parameters:
  1083. '*    intStack    Stack moving from
  1084. '*    x        Start left mouse position
  1085. '*    y        Start top mouse position
  1086. '**********************************************
  1087. Sub SetMoveStartValues (intStack,x,y)
  1088.  
  1089.     dim intCount
  1090.  
  1091.     CardMoving = strTopOfStack(intStack)
  1092.     If gstrBOTTOMOFSTACK <>  CardMoving then
  1093.         intCardInx = intGetCardIndex(CardMoving)
  1094.         If not grbCardShowing(intCardInx) then
  1095.             'Card was on the stack but not visible, so
  1096.             ' make it visible and exit the move.
  1097.             gintMoveCardInx = -1
  1098.             grbCardShowing(intCardInx) = True
  1099.             DrawCard intCardInx
  1100.             exit Sub
  1101.         End If
  1102.     Else
  1103.         gintMoveCardInx = -1
  1104.         Exit Sub
  1105.     End If
  1106.  
  1107.     'If this isn't from an Ace Stack. then we must calculate
  1108.     ' which card it is on that stack,
  1109.     If (gintAceStackStartInx > intStack) then
  1110.         intCount = intCountOnStack(intStack)
  1111.         'Calculate card position using default offset amount.
  1112.         ' No need to check horizontal offset because we wouldn't
  1113.         ' get this event unless we were already in the stack.
  1114.         ClickedCard = (Y \ intGetVertOffset(intStack)) + 1
  1115.         If ClickedCard > intCount then
  1116.             ClickedCard = intCount
  1117.         End If
  1118.         'Number of cards we are moving.
  1119.         gintCountMoving = (intCount - ClickedCard) + 1
  1120.  
  1121.         CardMoving = strGetStackElement(intStack,ClickedCard)
  1122.     Else
  1123.         'Can only move the top element on an Ace Stack.
  1124.         CardMoving = strTopOfStack(intStack)
  1125.         If (gstrBOTTOMOFSTACK = CardMoving) then
  1126.             gintMoveCardInx = -1
  1127.             exit Sub
  1128.         End If
  1129.         gintCountMoving = 1
  1130.     End If
  1131.         
  1132.     gintMoveCardInx = intGetCardIndex(CardMoving)
  1133.  
  1134.     If not grbCardShowing(gintMoveCardInx) then
  1135.         gintMoveCardInx = -1
  1136.         exit Sub
  1137.     End If
  1138.         
  1139.     'Save the stack it came from.
  1140.     gintSrcStack = intStack
  1141.  
  1142.     'Save starting values for the card to be used in
  1143.     ' DragCard.
  1144.     gdCardTop = grobjAllCards(gintMoveCardInx).top 
  1145.        gdCardLeft = grobjAllCards(gintMoveCardInx).left 
  1146.  
  1147.     intStackSize = intCountOnStack(intStack)
  1148.     for inx =  (intStackSize - gintCountMoving)+ 1 to intStackSize
  1149.         'Move the card to top of z order
  1150.         intCardInx = intGetCardIndex(strGetStackElement(intStack,inx))
  1151.         grobjAllCards(intCardInx).ZOrder(0)
  1152.     next 
  1153.  
  1154.     gdOffsetTop = intGetVertOffset(intStack) * intCountOnStack(intStack)
  1155.     gdStartTop = y
  1156.     gdStartLeft = x
  1157.  
  1158. End Sub 'SetMoveStartValues
  1159.  
  1160. '**********************************************
  1161. '* Name: DragCard
  1162. '**********************************************
  1163. '* Description:
  1164. '*    This is where a card is dragged.  Drag stops
  1165. '*    when a MouseUp event is fired.
  1166. '**********************************************
  1167. '* Parameters:
  1168. '*    intStack    Stack moving from
  1169. '*    x        Start left mouse position.
  1170. '*    y        Start top mouse position.
  1171. '**********************************************
  1172. Sub DragCard (intStack,x,y)
  1173.     'Move Top of intStack
  1174.     dim cntCard
  1175.  
  1176.     If gintMoveCardInx = -1 then Exit Sub
  1177.  
  1178.     'DragSkip is used to ignore a number of 
  1179.     ' MouseMove events. This is done so
  1180.     ' we won't be overdrawing the card
  1181.     ' when a draw really isn't necessary.
  1182.     ' It will also make the drag appear to be
  1183.     ' more responsive
  1184.  
  1185.     gintDragSkip = gintDragSkip - 1
  1186.     If gintDragSkip <> 0 then exit Sub
  1187.     gintDragSkip = 3
  1188.  
  1189.     intStackSize = intCountOnStack(intStack)
  1190.     cntCard = 0
  1191.     'Figure out new top and left.
  1192.     MyTop = grobjAllCards(gintMoveCardInx).top
  1193.     MyLeft = grobjAllCards(gintMoveCardInx).left
  1194.     for inx =  (intStackSize - gintCountMoving) + 1 to intStackSize
  1195.         intCardInx = intGetCardIndex(strGetStackElement(intStack,inx))
  1196.         'Apply new values to cards below current one, being sure to maintain offset.
  1197.         grobjAllCards(intCardInx).top =  MyTop + (y - gdStartTop) + (cntCard * intGetVertOffset(intStack))
  1198.            grobjAllCards(intCardInx).left = MyLeft +  (x - gdStartLeft)
  1199.         cntCard = cntCard + 1
  1200.     next 
  1201.  
  1202.     gdStartTop = y
  1203.     gdStartLeft = x
  1204. End Sub 'DragCard
  1205.  
  1206. '**********************************************
  1207. '* Name: SetMouseUp
  1208. '**********************************************
  1209. '* Description:
  1210. '*    Tells the move operation that MouseUp has
  1211. '*    happened. Will take care of seeing if 
  1212. '*    card was dropped in a movable place and
  1213. '*    if so, moves the card. If not in a valid
  1214. '*    place then the card is returned to the start
  1215. '*    stack.
  1216. '**********************************************
  1217. '* Parameters:
  1218. '*    intStack        Stack moving from.
  1219. '*    x        Start left mouse position.
  1220. '*    y        Start top mouse position.
  1221. '**********************************************
  1222. Sub SetMouseUp (intStack, x,y)
  1223.     If gintMoveCardInx = -1 then exit Sub
  1224.  
  1225.     'Calculate the screen coordinates based on the x and y.
  1226.     ScrnX = X + grobjAllCardStacks(intStack,1).left
  1227.     ScrnY = Y + grobjAllCardStacks(intStack,1).top
  1228.     inxStack = 1
  1229.     bHit = False
  1230.     while (inxStack <= gintCountAllStacks) and Not bHit
  1231.         set pCurStack = grobjAllCardStacks(inxStack,1)
  1232.  
  1233.         'Hit testing to see if we dropped it on a stack.
  1234.         If ScrnX >= pCurStack.left and ScrnX <= (pCurStack.Left + pCurStack.Width) then
  1235.             If ScrnY >= pCurStack.Top and ScrnY <= (pCurStack.Top + pCurStack.Height) then
  1236.                 bHit = True
  1237.             End If
  1238.         End If
  1239.         inxStack = inxStack + 1
  1240.     wEnd
  1241.     If inxStack > gintCountAllStacks then
  1242.         'Move it Back.
  1243.         MoveCard gintSrcStack
  1244.     Else
  1245.         'Move it for real.
  1246.         MoveCard inxStack-1
  1247.     End If
  1248. End Sub 'SetMouseUp
  1249.  
  1250. '**********************************************
  1251. '* Name: bIsLegalMove
  1252. '**********************************************
  1253. '* Description:
  1254. '*    Returns:
  1255. '*     True     Move from Src to Dest is valid.
  1256. '*     False    Not valid to move from Src to Dest.
  1257. '*
  1258. '*     Move is valid to a card stack when:
  1259. '*      Card moving is one less and different color.
  1260. '*    Move is valid to an Ace Stack when:
  1261. '*      Card moving is one greater and same suit.
  1262. '*    Moves are valid between card stacks and
  1263. '*    from ace and Discard Stack to card stack.
  1264. '*
  1265. '*     Not valid:
  1266. '*      Ace or Card stack to Discard Stack
  1267. '*      if card not face up.
  1268. '**********************************************
  1269. '* Parameters:
  1270. '*    intSrcStack    Stack coming from.
  1271. '*    intDestStack    Stack going to.
  1272. '*    strCard        Card being moved.
  1273. '**********************************************
  1274. Function bIsLegalMove(intSrcStack,intDestStack, strCard)
  1275.     dim intCard
  1276.     dim intCardInx
  1277.  
  1278.     bIsLegalMove = False
  1279.     'Can put a card anywhere we want in debug mode.
  1280.     If gbDebug then    
  1281.         bIsLegalMove = gbDebug
  1282.         exit Function
  1283.     End If
  1284.     if gintCountMoving > 1 and (intDestStack >= gintAceStackStartInx and intDestStack <= (gintAceStackStartInx + 3)) then
  1285.         exit function
  1286.     end if
  1287.  
  1288.     intCardInx = intGetCardIndex(strCard)
  1289.     If -1 = intCardInx then exit Function
  1290.  
  1291.     'Not valid, not visible.
  1292.     If not grbCardShowing(intCardInx) then Exit Function
  1293.  
  1294.     'Nothing moves to the Discard Stack (Not Valid).
  1295.     If gintDiscardStackInx = intDestStack then exit Function
  1296.  
  1297.     'Get card on top of destination for testing.
  1298.     DestCard = strTopOfStack(intDestStack)
  1299.     intCard = intCardVal(strCard)
  1300.     If gintAceStackStartInx <= intDestStack then
  1301.         'Move to Ace intStack?
  1302.         If (gstrBOTTOMOFSTACK = DestCard) then
  1303.             'Can move to empty Ace Stack if card is an Ace.
  1304.             bIsLegalMove = (gACE = intCard)
  1305.         Else
  1306.             bIsLegalMove = (bSameSuit (strCard,DestCard) and (intCard - 1 = intCardVal(DestCard)))
  1307.         End If
  1308.     Else 'Move to CardStack
  1309.         If (gstrBOTTOMOFSTACK = DestCard) then
  1310.             'Can move to empty card stack if card is a King.
  1311.             bIsLegalMove = (gKING = intCard)
  1312.         Else
  1313.             bIsLegalMove = ((Not bSameColor(strCard,DestCard)) and (intCard + 1 = intCardVal(DestCard)))
  1314.         End If
  1315.     End If
  1316. End Function
  1317.  
  1318. '**********************************************
  1319. '* Name: tmNewCard_Timer
  1320. '**********************************************
  1321. '* Description:
  1322. '*    Here is where a new card is assigned to 
  1323. '*     the animation routine when the last one
  1324. '*     has finished moving to the Ace Stack.
  1325. '**********************************************
  1326. '* Parameters:
  1327. '*    None
  1328. '**********************************************
  1329. Sub tmNewCard_Timer()
  1330.     If gbCardMoveDone then
  1331.         'Turn off all timers until we get a new card assigned.
  1332.         tmNewCard.enabled = false
  1333.         gbCardMoveDone = false
  1334.         'Our Start Case.
  1335.         If gintCurStackToMove = 0 then
  1336.             gintCurStackToMove = gintAceStackStartInx
  1337.         Else
  1338.             gobjCurMoveCard.left = grobjAllCardStacks(gintCurStackToMove,1).left
  1339.             gobjCurMoveCard.top = grobjAllCardStacks(gintCurStackToMove,1).top
  1340.         End If
  1341.  
  1342.         'See if cards are already on the Ace Stack.
  1343.         strCard = strTopOfStack(gintCurStackToMove)
  1344.         intCard = intCardVal(strCard)
  1345.         If -1 = intCard then
  1346.             intCard = gACE
  1347.         Else
  1348.             'Already have cards on the stack, let's pile the rest on.
  1349.             If 13 = intCard then gintCurStackToMove = gintCurStackToMove + 1
  1350.             intCard = intCard + 1
  1351.             While (intCard = 14) and (gintCurStackToMove <> gintAceStackStartInx + 4)
  1352.                 strCard = strTopOfStack(gintCurStackToMove)
  1353.                 If gstrBOTTOMOFSTACK = strCard then
  1354.                     intCard = gACE
  1355.                 Else
  1356.                     intCard = intCardVal(strCard)
  1357.                 End If
  1358.             Wend
  1359.         End If
  1360.         'We are done moving. Call end-game animation to bounce cards away
  1361.         If (gintCurStackToMove =  gintAceStackStartInx + 4) then
  1362.             SeeIfGameOver gintAceStackStartInx
  1363.             exit Sub
  1364.         End If
  1365.  
  1366.         'Current suit that is moving.
  1367.         CurMoveSuit = mid(gstrSuitOrder,((gintCurStackToMove - gintAceStackStartInx) + 1),1)
  1368.  
  1369.         'Move the card to the destination.
  1370.         strCard = intCard & CurMoveSuit
  1371.         push gintCurStackToMove,strCard
  1372.  
  1373.         'Get next card.
  1374.         intCardInx = intGetCardIndex(strCard)
  1375.         set gobjCurMoveCard = grobjAllCards(intCardInx)
  1376.  
  1377.         grbCardShowing(intCardInx) = True
  1378.         gobjCurMoveCard.ZOrder(0)
  1379.         DrawCard intCardInx
  1380.         
  1381.  
  1382.         'Figure out increments for moving it.
  1383.         gincCardMoveSteps = 5
  1384.         gincEndLeft = ((gobjCurMoveCard.left - grobjAllCardStacks(gintCurStackToMove,1).Left) \ gincCardMoveSteps)
  1385.         gincEndTop = ((gobjCurMoveCard.Top - grobjAllCardStacks(gintCurStackToMove,1).Top) \ gincCardMoveSteps)
  1386.     
  1387.         'Start the moving of the new card.
  1388.         tmEndCardMove.enabled = true
  1389.     End If
  1390. End Sub 'tmNewCard_Timer
  1391.  
  1392. '**********************************************
  1393. '* Name: tmEndCardMove_Timer
  1394. '**********************************************
  1395. '* Description:
  1396. '*    Here is where the actual moving of a 
  1397. '*    card to its Ace Stack happens after the
  1398. '*    user clicks End_The_Game.
  1399. '**********************************************
  1400. '* Parameters:
  1401. '*    None
  1402. '**********************************************
  1403. Sub tmEndCardMove_Timer()
  1404.     If (gincCardMoveSteps =  0) then
  1405.         'If card has completed moving, get a new one.
  1406.         gbCardMoveDone = true
  1407.         tmEndCardMove.enabled = false
  1408.         tmNewCard.enabled = true
  1409.         exit Sub
  1410.     End If
  1411.  
  1412.     'Not done yet, move it another increment.
  1413.     gincCardMoveSteps = gincCardMoveSteps - 1
  1414.     gobjCurMoveCard.left = gobjCurMoveCard.left - gincEndLeft
  1415.     gobjCurMoveCard.top = gobjCurMoveCard.top - gincEndTop
  1416. End Sub 'tmEndCardMove_Timer
  1417.  
  1418. '**********************************************
  1419. '* Name: EndTheGame
  1420. '**********************************************
  1421. '* Description:
  1422. '*    When a user clicks End the Game, this is where
  1423. '*    the whole process of moving
  1424. '*    those cards is started.
  1425. '**********************************************
  1426. '* Parameters:
  1427. '*    None
  1428. '**********************************************
  1429. Sub EndTheGame()
  1430.     'Remove ALL cards from the card stacks.
  1431.     for inx = 1 to gintCountCardStacks
  1432.         strCard = strPop(inx)
  1433.         while (strCard <> gstrBOTTOMOFSTACK)
  1434.             strCard = strPop(inx)
  1435.         Wend
  1436.     next
  1437.  
  1438.     gstrSuitOrder = ""
  1439.     'Figure out the order the suits are placed on the Ace Stack.
  1440.     ' gstrSuitOrder holds the order.
  1441.     for inx = gintAceStackStartInx to gintAceStackStartInx + 3    
  1442.         strCard = strTopOfStack(inx)
  1443.         If strCard <> gstrBOTTOMOFSTACK then
  1444.             gstrSuitOrder = gstrSuitOrder & strGetCardSuit(strCard)
  1445.         Else
  1446.             gstrSuitOrder = gstrSuitOrder & " "
  1447.         End If
  1448.     next 
  1449.     curSuit = "C"
  1450.     'Default order is CSHD if no cards are have been played on an Ace Stack.
  1451.     ' If cards are already displayed then figure out which ones we are missing
  1452.     ' and add them to the spaces in the string.
  1453.     for inx = 1 to 4
  1454.         If instr(gstrSuitOrder,curSuit) = 0 then
  1455.             blank = instr(gstrSuitOrder," ")
  1456.             gstrSuitOrder = left(gstrSuitOrder,blank - 1) & curSuit & mid(gstrSuitOrder,blank+1)
  1457.         End If
  1458.         Select Case curSuit
  1459.         Case "C"
  1460.             curSuit = "S"
  1461.         Case "S"
  1462.             curSuit = "H"
  1463.         case "H"
  1464.             curSuit = "D"
  1465.         End select
  1466.     next
  1467.  
  1468.     gintCurStackToMove = 0
  1469.     gbCardMoveDone = true
  1470.  
  1471.     'Set up and start the timers to move the first
  1472.     ' card.
  1473.     tmNewCard.Interval = 1
  1474.     tmNewCard.Enabled = true
  1475.  
  1476.     tmEndCardMove.interval = 1
  1477.  
  1478. End Sub 'EndTheGame
  1479.  
  1480. '**********************************************
  1481. '* Name: SeeIfGameOver
  1482. '**********************************************
  1483. '* Description:
  1484. '*    This is the place to see if all
  1485. '*     the Kings are placed on their proper
  1486. '*     Ace Stack and, if so, start the animation.
  1487. '**********************************************
  1488. '* Parameters:
  1489. '*    intStack        Stack to test.
  1490. '**********************************************
  1491. Sub SeeIfGameOver(intStack)
  1492.     If (gintAceStackStartInx > intStack) or (gintAceStackStartInx+4 < intStack) then
  1493.         exit Sub
  1494.     End If
  1495.     bWon = true
  1496.     inx = gintAceStackStartInx
  1497.     'Go until we don't see a king or we tested the last
  1498.     ' Ace Stack.
  1499.     while bWon and inx < gintAceStackStartInx + 4
  1500.         strCard = strTopOfStack(inx)
  1501.         If (gstrBOTTOMOFSTACK <> strCard) then
  1502.             bWon = (gKING = intCardVal(strCard))
  1503.         Else
  1504.             bWon = False
  1505.         End If
  1506.         inx = inx + 1
  1507.     wEnd 
  1508.  
  1509.     If not bWon then exit Sub
  1510.  
  1511.     'We WON!! Let's initialize for animation.
  1512.     gCardCount = 52
  1513.     tmEndAnimation.interval = 4
  1514.     gbAnimationDone = false
  1515.  
  1516.     'Moving all four cards.
  1517.     for inx = 0 to 3
  1518.         gbDoneMoving(inx) = true
  1519.     next
  1520.     Randomize
  1521.     gbLeaveEarly = False
  1522.  
  1523.     tmEndAnimation.enabled = true
  1524.  
  1525. End Sub 'SeeIfGameOver
  1526.  
  1527. '**********************************************
  1528. '* Name: tmEndAnimation_Timer
  1529. '**********************************************
  1530. '* Description:
  1531. '*    Here is where all of the work for the 
  1532. '*    bouncing cards animation takes place.
  1533. '**********************************************
  1534. '* Parameters:
  1535. '**********************************************
  1536. Sub tmEndAnimation_Timer()
  1537.     dim objCard
  1538. ' inc-/decrement position
  1539.     If gbAnimationDone or gbLeaveEarly then
  1540.         'User wanted to exit early or animation finished.
  1541.         tmEndAnimation.enabled = false
  1542.         gbAnimationDone = True
  1543.         msgbox "You Won !!!"
  1544.         ClearAllCards
  1545.         exit Sub
  1546.     End If
  1547.     gbAnimationDone = true
  1548.     for inx = 0 to 3
  1549.         'See if one of the 4 cards is done so we can assign another one.
  1550.         If gbDoneMoving(inx) then
  1551.             'Get next card.
  1552.             strCard = strPop(inx + gintAceStackStartInx)
  1553.             If (gstrBOTTOMOFSTACK <> strCard) then
  1554.                 intCardInx = intGetCardIndex(strCard)
  1555.                 set grCardBouncing(inx,1) = grobjAllCards(intCardInx)
  1556.                     'The following random is subtracted by half the range so 
  1557.                     ' both positive and negative directions can be generated.
  1558.                 grCardBouncing(inx,2) = (rnd() * 10) - 5    'Vertical
  1559.                 grCardBouncing(inx,3) = (rnd() * 30) - 15    'Horizontal
  1560.                 gbDoneMoving(inx) = false
  1561.             Else
  1562.             'Hit bottom of stack, no more bouncing.
  1563.                 grCardBouncing(inx,1) = 0
  1564.             End If
  1565.         End If
  1566.  
  1567.         'Figure out effect of gravity.
  1568.         grCardBouncing(inx,2) = grCardBouncing(inx,2) + (gdGravity * (tmEndAnimation.interval/100))
  1569.         If not gbDoneMoving(inx) then
  1570.             set objCard = grCardBouncing(inx,1)
  1571.             'Get new position.
  1572.             objCard.left = objCard.left + grCardBouncing(inx,3)
  1573.             objCard.top = objCard.top +  grCardBouncing(inx,2)
  1574.  
  1575.             'check for border bounce,
  1576.             gbDoneMoving(inx) = (objCard.left >= Form.Width) or (objCard.left + objCard.Width <= 0)
  1577.             gbDoneMoving(inx) = gbDoneMoving(inx) or (objCard.top > Form.height) or ((objCard.top + objCard.height) < 0)
  1578.  
  1579.             'Here's the friction and direction change if necessary.
  1580.             If (grCardBouncing(inx,1).top <= 0) then 
  1581.                 grCardBouncing(inx,2) = -1 * (grCardBouncing(inx,2) + gdFriction)
  1582.             elseif (objCard.top + objCard.height) >= Form.Height then 
  1583.                 grCardBouncing(inx,2) = (gdFriction - (grCardBouncing(inx,2)))
  1584.             End If
  1585.         End If
  1586.         gbAnimationDone = (gbAnimationDone and gbDoneMoving(inx) and (gstrBOTTOMOFSTACK = strTopOfStack(inx + gintAceStackStartInx)))
  1587.     next 
  1588. End Sub 'tmEndAnimation_timer
  1589.  
  1590. '**********************************************
  1591. '* Name: MoveCard
  1592. '**********************************************
  1593. '* Description:
  1594. '*    This is where a card move actually is
  1595. '*      done. For the source stack, it relies
  1596. '*     on gintSrcStack.
  1597. '**********************************************
  1598. '* Parameters:
  1599. '*    intDestStack    Destination stack
  1600. '**********************************************
  1601. Sub MoveCard (intDestStack)
  1602.     'See If Card hit a different intStack.
  1603.     'If not, hit other intStack or legal drop, then move back to original intStack.
  1604.     intStackSize = intCountOnStack(gintSrcStack)
  1605.     intTopOfMove = (intStackSize - gintCountMoving)+ 1
  1606.  
  1607.     'Move from Src to Dest.
  1608.     If (gintSrcStack <> intDestStack) then 
  1609.         strCard = strGetStackElement(gintSrcStack,intTopOfMove)
  1610.  
  1611.         'See if it is legal to do this move.
  1612.         If bIsLegalMove(gintSrcStack,intDestStack,strCard) then
  1613.             for inx =  (intStackSize - gintCountMoving)+ 1 to intStackSize
  1614.             'Yes, let's move all the cards to the new stack.
  1615.                 strCard = strGetStackElement(gintSrcStack,inx)
  1616.                 Push intDestStack,strCard
  1617.             next 
  1618.             'However many moved must be removed from the source.
  1619.             for inx = 1 to gintCountMoving
  1620.                 strCard = strPop(gintSrcStack)
  1621.             next
  1622.             grobjAllCardStacks(intDestStack,1).Zorder(0)
  1623.             DrawStack intDestStack
  1624.  
  1625.             'After that move, let's see if it is the last.
  1626.             SeeIfGameOver intDestStack
  1627.             exit Sub
  1628.         End If
  1629.     End If
  1630.     cntCard = 0
  1631.     'Source and destination were the same, let's move cards back.
  1632.     for inx =  intTopOfMove to intStackSize
  1633.         intCardInx = intGetCardIndex(strGetStackElement(gintSrcStack,inx))
  1634.         grobjAllCards(intCardInx).top = gdCardTop + (cntCard * intGetVertOffset(intStack))
  1635.               grobjAllCards(intCardInx).left = gdCardLeft
  1636.         cntCard = cntCard + 1
  1637.     next 
  1638.     grobjAllCardStacks(gintSrcStack,1).Zorder(0)
  1639. End Sub 'MoveCard
  1640. -->
  1641. </SCRIPT>
  1642. <SCRIPT LANGUAGE="VBScript">
  1643. <!--
  1644. '**********************************************
  1645. '* Name: Discard Stack Mouse events
  1646. '**********************************************
  1647. '* Description:
  1648. '*    These events will handle the moving
  1649. '*    of cards from the Discard Stack to either
  1650. '*    the Ace Stack or a card stack.
  1651. '**********************************************
  1652. Sub Discard_DblClick(Cancel)
  1653.    DoDblClick gintDiscardStackInx
  1654. End Sub
  1655. Sub Discard_MouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y)
  1656.     If 1 <> Button then exit Sub
  1657.     gbMouseUp = false
  1658.     SetMoveStartValues gintDiscardStackInx,x,y
  1659. End Sub
  1660.  
  1661. Sub Discard_MouseMove(Button, Shift, X, Y)
  1662.     If (1 <> Button) or gbMouseUp then exit Sub
  1663.  
  1664.     DragCard gintDiscardStackInx,x,y
  1665. End Sub
  1666.  
  1667. Sub Discard_MouseUp(Button, Shift, X, Y)
  1668.     gbMouseUp = True
  1669.     SetMouseUp gintDiscardStackInx,x,y
  1670. End Sub
  1671.  
  1672. -->
  1673. </SCRIPT>
  1674. <SCRIPT LANGUAGE="VBScript">
  1675. <!--
  1676. '**********************************************
  1677. '* Name: Shuffle Stack Mouse events
  1678. '**********************************************
  1679. '* Description:
  1680. '*    These events will handle the moving
  1681. '*    of cards from the Shuffle Stack to the
  1682. '*    Discard Stack..
  1683. '**********************************************
  1684. Sub Shuffle_MouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y)
  1685.     ShuffleClicked(gintShuffleStackInx)
  1686. End Sub
  1687. -->
  1688. </SCRIPT>
  1689. <SCRIPT LANGUAGE="VBScript">
  1690. <!--
  1691. '**********************************************
  1692. '* Name: Ace Stack mouse events
  1693. '**********************************************
  1694. '* Description:
  1695. '*    These mouse events for all the Ace Stacks
  1696. '*    will handle moving cards from an ace
  1697. '*    stack back to a card stack ONLY.
  1698. '**********************************************
  1699. Sub Ace1_MouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y)
  1700.     If 1 <> Button then exit Sub
  1701.     gbMouseUp = false
  1702.     SetMoveStartValues gintCountCardStacks + 1,x,y
  1703. End Sub
  1704.  
  1705. Sub Ace1_MouseMove(Button, Shift, X, Y)
  1706.     If (1 <> Button) or gbMouseUp then exit Sub
  1707.     DragCard gintCountCardStacks + 1,x,y
  1708. End Sub
  1709.  
  1710. Sub Ace1_MouseUp(Button, Shift, X, Y)
  1711.     gbMouseUp = True
  1712.     SetMouseUp gintCountCardStacks + 1,x,y
  1713. End Sub
  1714.  
  1715. -->
  1716. </SCRIPT>
  1717. <SCRIPT LANGUAGE="VBScript">
  1718. <!--
  1719. Sub Ace2_MouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y)
  1720.     If 1 <> Button then exit Sub
  1721.     gbMouseUp = false
  1722.     SetMoveStartValues gintCountCardStacks + 2,x,y
  1723. End Sub
  1724.  
  1725. Sub Ace2_MouseMove(Button, Shift, X, Y)
  1726.     If (1 <> Button) or gbMouseUp then exit Sub
  1727.     DragCard gintCountCardStacks + 2,x,y
  1728. End Sub
  1729.  
  1730. Sub Ace2_MouseUp(Button, Shift, X, Y)
  1731.     gbMouseUp = True
  1732.     SetMouseUp gintCountCardStacks + 2,x,y
  1733. End Sub
  1734.  
  1735. -->
  1736. </SCRIPT>
  1737. <SCRIPT LANGUAGE="VBScript">
  1738. <!--
  1739. Sub Ace3_MouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y)
  1740.     If 1 <> Button then exit Sub
  1741.     gbMouseUp = false
  1742.     SetMoveStartValues gintCountCardStacks + 3,x,y
  1743. End Sub
  1744.  
  1745. Sub Ace3_MouseMove(Button, Shift, X, Y)
  1746.     If (1 <> Button) or gbMouseUp then exit Sub
  1747.     DragCard gintCountCardStacks + 3,x,y
  1748. End Sub
  1749.  
  1750. Sub Ace3_MouseUp(Button, Shift, X, Y)
  1751.     gbMouseUp = True
  1752.     SetMouseUp gintCountCardStacks + 3,x,y
  1753. End Sub
  1754.  
  1755. -->
  1756. </SCRIPT>
  1757. <SCRIPT LANGUAGE="VBScript">
  1758. <!--
  1759. Sub Ace4_MouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y)
  1760.     If 1 <> Button then exit Sub
  1761.     gbMouseUp = false
  1762.     SetMoveStartValues gintCountCardStacks + 4,x,y
  1763. End Sub
  1764.  
  1765. Sub Ace4_MouseMove(Button, Shift, X, Y)
  1766.     If (1 <> Button) or gbMouseUp then exit Sub
  1767.     DragCard gintCountCardStacks + 4,x,y
  1768. End Sub
  1769.  
  1770. Sub Ace4_MouseUp(Button, Shift, X, Y)
  1771.     gbMouseUp = True
  1772.     SetMouseUp gintCountCardStacks + 4,x,y
  1773. End Sub
  1774.  
  1775. -->
  1776. </SCRIPT>
  1777. <SCRIPT LANGUAGE="VBScript">
  1778. <!--
  1779. '**********************************************
  1780. '* Name: Card stack mouse events
  1781. '**********************************************
  1782. '* Description:
  1783. '*    These events will handle the moving
  1784. '*    of cards from one stack to another, from
  1785. '*    the Discard Stack to the card stacks or from
  1786. '*    an Ace Stack to a card stack.
  1787. '**********************************************
  1788.  
  1789. Sub Stack7_DblClick(Cancel)
  1790.    DoDblClick 7
  1791. End Sub
  1792. Sub Stack7_MouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y)
  1793.     If 1 <> Button then exit Sub
  1794.     gbMouseUp = false
  1795.     SetMoveStartValues 7,x,y
  1796. End Sub
  1797.  
  1798. Sub Stack7_MouseMove(Button, Shift, X, Y)
  1799.     If (1 <> Button) or gbMouseUp then exit Sub
  1800.     DragCard 7,x,y
  1801. End Sub
  1802.  
  1803. Sub Stack7_MouseUp(Button, Shift, X, Y)
  1804.     gbMouseUp = True
  1805.     SetMouseUp 7,x,y
  1806. End Sub
  1807.  
  1808. -->
  1809. </SCRIPT>
  1810. <SCRIPT LANGUAGE="VBScript">
  1811. <!--
  1812. Sub Stack6_DblClick(Cancel)
  1813.    DoDblClick 6
  1814. End Sub
  1815. Sub Stack6_MouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y)
  1816.     If 1 <> Button then exit Sub
  1817.     gbMouseUp = false
  1818.     SetMoveStartValues 6,x,y
  1819. End Sub
  1820.  
  1821. Sub Stack6_MouseMove(Button, Shift, X, Y)
  1822.     If (1 <> Button) or gbMouseUp then exit Sub
  1823.     DragCard 6,x,y
  1824. End Sub
  1825.  
  1826. Sub Stack6_MouseUp(Button, Shift, X, Y)
  1827.     gbMouseUp = True
  1828.     SetMouseUp 6,x,y
  1829. End Sub
  1830.  
  1831. -->
  1832. </SCRIPT>
  1833. <SCRIPT LANGUAGE="VBScript">
  1834. <!--
  1835. Sub Stack5_DblClick(Cancel)
  1836.    DoDblClick 5
  1837. End Sub
  1838. Sub Stack5_MouseUp(Button, Shift, X, Y)
  1839.     gbMouseUp = True
  1840.     SetMouseUp 5,x,y
  1841. End Sub
  1842. Sub Stack5_MouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y)
  1843.     If 1 <> Button then exit Sub
  1844.     gbMouseUp = false
  1845.     SetMoveStartValues 5,x,y
  1846. End Sub
  1847. Sub Stack5_MouseMove(Button, Shift, X, Y)
  1848.     If (1 <> Button) or gbMouseUp then exit Sub
  1849.     DragCard 5,x,y
  1850. End Sub
  1851. -->
  1852. </SCRIPT>
  1853. <SCRIPT LANGUAGE="VBScript">
  1854. <!--
  1855. Sub Stack4_DblClick(Cancel)
  1856.    DoDblClick 4
  1857. End Sub
  1858. Sub Stack4_MouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y)
  1859.     If 1 <> Button then exit Sub
  1860.     gbMouseUp = false
  1861.     SetMoveStartValues 4,x,y
  1862. End Sub
  1863. Sub Stack4_MouseMove(Button, Shift, X, Y)
  1864.     If (1 <> Button) or gbMouseUp then exit Sub
  1865.     DragCard 4,x,y
  1866. End Sub
  1867. Sub Stack4_MouseUp(Button, Shift, X, Y)
  1868.     gbMouseUp = True
  1869.     SetMouseUp 4,x,y
  1870. End Sub
  1871. -->
  1872. </SCRIPT>
  1873. <SCRIPT LANGUAGE="VBScript">
  1874. <!--
  1875. Sub Stack3_DblClick(Cancel)
  1876.    DoDblClick 3
  1877. End Sub
  1878. Sub Stack3_MouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y)
  1879.     If 1 <> Button then exit Sub
  1880.     gbMouseUp = false
  1881.     SetMoveStartValues 3,x,y
  1882. End Sub
  1883. Sub Stack3_MouseMove(Button, Shift, X, Y)
  1884.     If (1 <> Button) or gbMouseUp then exit Sub
  1885.     DragCard 3,x,y
  1886. End Sub
  1887. Sub Stack3_MouseUp(Button, Shift, X, Y)
  1888.     gbMouseUp = True
  1889.     SetMouseUp 3,x,y
  1890. End Sub
  1891. -->
  1892. </SCRIPT>
  1893. <SCRIPT LANGUAGE="VBScript">
  1894. <!--
  1895. Sub Stack2_DblClick(Cancel)
  1896.    DoDblClick 2
  1897. End Sub
  1898. Sub Stack2_MouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y)
  1899.     If 1 <> Button then exit Sub
  1900.     gbMouseUp = false
  1901.     SetMoveStartValues 2,x,y
  1902. End Sub
  1903. Sub Stack2_MouseMove(Button, Shift, X, Y)
  1904.     If (1 <> Button) or gbMouseUp then exit Sub
  1905.     DragCard 2,x,y
  1906. End Sub
  1907. Sub Stack2_MouseUp(Button, Shift, X, Y)
  1908.     gbMouseUp = True
  1909.     SetMouseUp 2,x,y
  1910. End Sub
  1911. -->
  1912. </SCRIPT>
  1913. <SCRIPT LANGUAGE="VBScript">
  1914. <!--
  1915. Sub Stack1_DblClick(Cancel)
  1916.    DoDblClick 1
  1917. End Sub
  1918. Sub Stack1_MouseUp(Button, Shift, X, Y)
  1919.     gbMouseUp = True
  1920.     SetMouseUp 1,x,y
  1921. End Sub
  1922. Sub Stack1_MouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y)
  1923.     If 1 <> Button then exit Sub
  1924.     gbMouseUp = false
  1925.     SetMoveStartValues 1,x,y
  1926. End Sub
  1927. Sub Stack1_MouseMove(Button, Shift, X, Y)
  1928.     If (1 <> Button) or gbMouseUp then exit Sub
  1929.     DragCard 1,x,y
  1930. End Sub
  1931. -->
  1932. </SCRIPT>
  1933. <SCRIPT LANGUAGE="VBScript">
  1934. <!--
  1935. Sub chkDebug_Click()
  1936.     lstDebugPrint.Visible = chkDebug.Value
  1937.     gbDebug = chkDebug.value
  1938. End Sub
  1939. -->
  1940. </SCRIPT>
  1941. <SCRIPT LANGUAGE="VBScript">
  1942. <!--
  1943. '**********************************************
  1944. '* Name: cmdEndGame_Click
  1945. '**********************************************
  1946. '* Description:
  1947. '*    User clicks this button to end the game
  1948. '**********************************************
  1949. Sub cmdEndGame_Click()
  1950.     If not gbEndGame then
  1951.         EndTheGame
  1952.         gbEndGame = True
  1953.     End If
  1954. End Sub
  1955. 'Check box for debug mode
  1956. Sub UpDebug_Click()
  1957.     If not gbEndGame then
  1958.         chkDebug.visible = not chkdebug.visible
  1959.     End If
  1960. End Sub
  1961. -->
  1962. </SCRIPT>
  1963. <SCRIPT LANGUAGE="VBScript">
  1964. <!--
  1965. '**********************************************
  1966. '* Name: cmdNewDeck_Click
  1967. '**********************************************
  1968. '* Description:
  1969. '*    User clicks this button to pop up the
  1970. '*    dialog that allows the user to
  1971. '*    choose a different deck.
  1972. '**********************************************
  1973. sub cmdNewDeck_Click()
  1974.     CardDeckClick(-gintCurDeck)
  1975.     CardDeckOnOff(true)
  1976. end sub 'cmdNewDeck_Click
  1977. '**********************************************
  1978. '* Name: CardDeckOk_Click
  1979. '**********************************************
  1980. '* Description:
  1981. '*    Routine called when user clicks the ok
  1982. '*    button in the CardDeck dialog. The routine
  1983. '*    will store the new deck choice and close
  1984. '*    the dialog.
  1985. '**********************************************
  1986. sub CardDeckOk_Click()
  1987.     ChangeTheDeck gintTempCurDeck
  1988.     CardDeckOnOff(false)
  1989. end sub 
  1990. '**********************************************
  1991. '* Name: CardDeckCancel_Click 
  1992. '**********************************************
  1993. '* Description:
  1994. '*    Called to close the card back dialog
  1995. '*    and the NOT change the value of the 
  1996. '*    current deck
  1997. '**********************************************
  1998. sub CardDeckCancel_Click()
  1999.     CardDeckOnOff(false)
  2000. end sub
  2001. '**********************************************
  2002. '* Name: CardDeckClick
  2003. '**********************************************
  2004. '* Description:
  2005. '*    Moves the "selection" square in the Deck
  2006. '*    back dialog to visually show the user
  2007. '*    which card back is choosen
  2008. '**********************************************
  2009. '*    Parameters:
  2010. '*    intCardNum    Deck that is choosen by the user
  2011. '**********************************************
  2012. sub CardDeckClick(intCardnum)
  2013.     gintTempCurDeck = -intCardnum
  2014.     CardDeckSelector.Left = grobjCardDeck(intCardnum).Left - 4
  2015.     CardDeckSelector.Top = grobjCardDeck(intCardnum).Top - 4
  2016. end sub
  2017.  
  2018. sub CardDeck1_Click:    CardDeckClick 1:    end sub
  2019. sub CardDeck2_Click:    CardDeckClick 2:    end sub
  2020. sub CardDeck3_Click:    CardDeckClick 3:    end sub
  2021. sub CardDeck4_Click:    CardDeckClick 4:    end sub
  2022. sub CardDeck5_Click:    CardDeckClick 5:    end sub
  2023. sub CardDeck6_Click:    CardDeckClick 6:    end sub
  2024. sub CardDeck7_Click:    CardDeckClick 7:    end sub
  2025. sub CardDeck8_Click:    CardDeckClick 8:    end sub
  2026. sub CardDeck9_Click:    CardDeckClick 9:    end sub
  2027. sub CardDeck10_Click:    CardDeckClick 10:    end sub
  2028. sub CardDeck11_Click:    CardDeckClick 11:    end sub
  2029. sub CardDeck12_Click:    CardDeckClick 12:    end sub
  2030.  
  2031. '**********************************************
  2032. '* Name: CardDeckOnOff
  2033. '**********************************************
  2034. '* Description:
  2035. '*    Displays or hides the dialog with the
  2036. '*    card backs depending on the parameter.
  2037. '**********************************************
  2038. '*    Parameters:
  2039. '*    bSwitch    True = Show dialog
  2040. '*            False = Hide dialog
  2041. '**********************************************
  2042. sub CardDeckOnOff(bSwitch)
  2043.     if( bSwitch = true ) then
  2044.         bSwitchz = 0
  2045.     else
  2046.         bSwitchz = 1
  2047.     end if
  2048.     CardDeckMouseBlock.Zorder(bSwitchz):    CardDeckMouseBlock.Visible = bSwitch
  2049.     CardDeckBack.Zorder(bSwitchz):        CardDeckBack.Visible = bSwitch
  2050.     CardDeckSelector.Zorder(bSwitchz):    CardDeckSelector.Visible = bSwitch
  2051.     for t = 1 to 12
  2052.         grobjCardDeck(t).Zorder(bSwitchz):     grobjCardDeck(t).Visible = bSwitch
  2053.     next
  2054.     CardDeckOk.Zorder(bSwitchz):        CardDeckOk.Visible = bSwitch
  2055.     CardDeckCancel.Zorder(bSwitchz):        CardDeckCancel.Visible = bSwitch    
  2056. end sub
  2057. -->
  2058. </SCRIPT>
  2059. <SCRIPT LANGUAGE="VBScript">
  2060. <!--
  2061. 'New deal.
  2062. Sub cmdNewDeal_Click()
  2063.     StartGame
  2064. End Sub
  2065. -->
  2066. </SCRIPT>
  2067. <SCRIPT LANGUAGE="VBScript">
  2068. <!--
  2069. 'Click on the background when the end animation is running
  2070. ' to stop the animation and bring up the You Won dialog.
  2071. Sub EndGameClick_MouseDown(Button, Shift, X, Y)
  2072.     If gbEndGame then
  2073.         gbLeaveEarly = true
  2074.     End If
  2075. End Sub
  2076. -->
  2077. </SCRIPT>
  2078. <SCRIPT LANGUAGE="VBScript">
  2079. <!--
  2080. 'Changes the number of cards that are dealt from
  2081. ' the Shuffle Stack to the Discard Stack
  2082. Sub cmdChangeDeal_Click()
  2083.     if( gCOUNTDEAL = 1 ) then
  2084.         gCOUNTDEAL = 3
  2085.         cmdChangeDeal.Caption = "Change to Deal 1"
  2086.     else
  2087.         gCOUNTDEAL = 1 
  2088.         cmdChangeDeal.Caption = "Change to Deal 3"
  2089.     end if
  2090. end sub
  2091. -->
  2092. </SCRIPT>
  2093. <DIV BACKGROUND="#8000" ID="Form" STYLE="LAYOUT:FIXED;WIDTH:651pt;HEIGHT:444pt;">
  2094.     <OBJECT ID="CardDeckMouseBlock"
  2095.      CLASSID="CLSID:978C9E23-D4B0-11CE-BF2D-00AA003F40D0" STYLE="TOP:-1pt;LEFT:-2pt;WIDTH:590pt;HEIGHT:362pt;DISPLAY:NONE;ZINDEX:0;">
  2096.         <PARAM NAME="BackColor" VALUE="32768">
  2097.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2098.         <PARAM NAME="Size" VALUE="20814;12771">
  2099.         <PARAM NAME="FontCharSet" VALUE="0">
  2100.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  2101.         <PARAM NAME="FontWeight" VALUE="0">
  2102.     </OBJECT>
  2103.     <OBJECT ID="CardDeckBack"
  2104.      CLASSID="CLSID:D7053240-CE69-11CD-A777-00DD01143C57" STYLE="TOP:83pt;LEFT:74pt;WIDTH:420pt;HEIGHT:223pt;TABINDEX:2;DISPLAY:NONE;ZINDEX:1;">
  2105.         <PARAM NAME="VariousPropertyBits" VALUE="25">
  2106.         <PARAM NAME="Size" VALUE="14817;7867">
  2107.         <PARAM NAME="FontEffects" VALUE="1073750016">
  2108.         <PARAM NAME="FontCharSet" VALUE="0">
  2109.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  2110.         <PARAM NAME="ParagraphAlign" VALUE="3">
  2111.         <PARAM NAME="FontWeight" VALUE="0">
  2112.     </OBJECT>
  2113.     <OBJECT ID="EndGameClick"
  2114.      CLASSID="CLSID:978C9E23-D4B0-11CE-BF2D-00AA003F40D0" STYLE="TOP:0pt;LEFT:0pt;WIDTH:644pt;HEIGHT:440pt;ZINDEX:2;">
  2115.         <PARAM NAME="BackColor" VALUE="32768">
  2116.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2117.         <PARAM NAME="Size" VALUE="22719;15522">
  2118.         <PARAM NAME="FontCharSet" VALUE="0">
  2119.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  2120.     </OBJECT>
  2121.     <OBJECT ID="CardDeckSelector"
  2122.      CLASSID="CLSID:978C9E23-D4B0-11CE-BF2D-00AA003F40D0" STYLE="TOP:87pt;LEFT:86pt;WIDTH:65pt;HEIGHT:82pt;DISPLAY:NONE;ZINDEX:3;">
  2123.         <PARAM NAME="ForeColor" VALUE="0">
  2124.         <PARAM NAME="BackColor" VALUE="0">
  2125.         <PARAM NAME="Size" VALUE="2293;2893">
  2126.         <PARAM NAME="FontCharSet" VALUE="0">
  2127.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  2128.         <PARAM NAME="FontWeight" VALUE="0">
  2129.     </OBJECT>
  2130.     <OBJECT ID="tmEndAnimation"
  2131.      CLASSID="CLSID:59CCB4A0-727D-11CF-AC36-00AA00A47DD2"
  2132.      CODEBASE="ietimer.ocx"
  2133.      STYLE="TOP:454pt;LEFT:8pt;WIDTH:25pt;HEIGHT:17pt;TABINDEX:0;ZINDEX:4;">
  2134.         <PARAM NAME="_ExtentX" VALUE="873">
  2135.         <PARAM NAME="_ExtentY" VALUE="609">
  2136.     </OBJECT>
  2137.  
  2138.     <OBJECT ID="Card1H"
  2139.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:0pt;LEFT:149pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:1;ZINDEX:5;"
  2140.     CODEBASE="card.ocx">   
  2141.         <PARAM NAME="_ExtentX" VALUE="2037">
  2142.         <PARAM NAME="_ExtentY" VALUE="2619">
  2143.     </OBJECT>
  2144.     <OBJECT ID="Ace3"
  2145.      CLASSID="CLSID:2B32FBC2-A8F1-11CF-93EE-00AA00C08FDF" STYLE="TOP:17pt;LEFT:437pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:6;">
  2146.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2147.         <PARAM NAME="Size" VALUE="1905;2540">
  2148.     </OBJECT>
  2149.     <OBJECT ID="AceImage3"
  2150.      CLASSID="CLSID:D4A97620-8E8F-11CF-93CD-00AA00C08FDF" STYLE="TOP:17pt;LEFT:437pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:7;">
  2151.         <PARAM NAME="PicturePath" VALUE="acestack.jpg">
  2152.         <PARAM NAME="BackColor" VALUE="32768">
  2153.         <PARAM NAME="BorderStyle" VALUE="0">
  2154.         <PARAM NAME="Size" VALUE="1905;2540">
  2155.         <PARAM NAME="VariousPropertyBits" VALUE="19">
  2156.     </OBJECT>
  2157.     <OBJECT ID="Ace1"
  2158.      CLASSID="CLSID:2B32FBC2-A8F1-11CF-93EE-00AA00C08FDF" STYLE="TOP:17pt;LEFT:305pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:8;">
  2159.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2160.         <PARAM NAME="Size" VALUE="1905;2540">
  2161.     </OBJECT>
  2162.     <OBJECT ID="AceImage1"
  2163.      CLASSID="CLSID:D4A97620-8E8F-11CF-93CD-00AA00C08FDF" STYLE="TOP:17pt;LEFT:305pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:9;">
  2164.         <PARAM NAME="PicturePath" VALUE="acestack.jpg">
  2165.         <PARAM NAME="BackColor" VALUE="32768">
  2166.         <PARAM NAME="BorderStyle" VALUE="0">
  2167.         <PARAM NAME="Size" VALUE="1905;2540">
  2168.         <PARAM NAME="VariousPropertyBits" VALUE="19">
  2169.     </OBJECT>
  2170.     <OBJECT ID="Ace2"
  2171.      CLASSID="CLSID:2B32FBC2-A8F1-11CF-93EE-00AA00C08FDF" STYLE="TOP:17pt;LEFT:371pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:10;">
  2172.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2173.         <PARAM NAME="Size" VALUE="1905;2540">
  2174.     </OBJECT>
  2175.     <OBJECT ID="AceImage2"
  2176.      CLASSID="CLSID:D4A97620-8E8F-11CF-93CD-00AA00C08FDF" STYLE="TOP:17pt;LEFT:371pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:11;">
  2177.         <PARAM NAME="PicturePath" VALUE="acestack.jpg">
  2178.         <PARAM NAME="BackColor" VALUE="32768">
  2179.         <PARAM NAME="BorderStyle" VALUE="0">
  2180.         <PARAM NAME="Size" VALUE="1905;2540">
  2181.         <PARAM NAME="VariousPropertyBits" VALUE="19">
  2182.     </OBJECT>
  2183.     <OBJECT ID="Ace4"
  2184.      CLASSID="CLSID:2B32FBC2-A8F1-11CF-93EE-00AA00C08FDF" STYLE="TOP:17pt;LEFT:503pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:12;">
  2185.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2186.         <PARAM NAME="Size" VALUE="1905;2540">
  2187.     </OBJECT>
  2188.     <OBJECT ID="AceImage4"
  2189.      CLASSID="CLSID:D4A97620-8E8F-11CF-93CD-00AA00C08FDF" STYLE="TOP:17pt;LEFT:503pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:13;">
  2190.         <PARAM NAME="PicturePath" VALUE="acestack.jpg">
  2191.         <PARAM NAME="BackColor" VALUE="32768">
  2192.         <PARAM NAME="BorderStyle" VALUE="0">
  2193.         <PARAM NAME="Size" VALUE="1905;2540">
  2194.         <PARAM NAME="VariousPropertyBits" VALUE="19">
  2195.     </OBJECT>
  2196.     <OBJECT ID="ShuffleImage"
  2197.      CLASSID="CLSID:D4A97620-8E8F-11CF-93CD-00AA00C08FDF" STYLE="TOP:17pt;LEFT:25pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:14;">
  2198.         <PARAM NAME="PicturePath" VALUE="shuffle.jpg">
  2199.         <PARAM NAME="BorderStyle" VALUE="0">
  2200.         <PARAM NAME="Size" VALUE="1905;2540">
  2201.         <PARAM NAME="VariousPropertyBits" VALUE="19">
  2202.     </OBJECT>
  2203.     <OBJECT ID="Stack1"
  2204.      CLASSID="CLSID:2B32FBC2-A8F1-11CF-93EE-00AA00C08FDF" STYLE="TOP:116pt;LEFT:107pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:15;">
  2205.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2206.         <PARAM NAME="Size" VALUE="1905;2540">
  2207.     </OBJECT>
  2208.     <OBJECT ID="Stack2"
  2209.      CLASSID="CLSID:2B32FBC2-A8F1-11CF-93EE-00AA00C08FDF" STYLE="TOP:116pt;LEFT:173pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:16;">
  2210.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2211.         <PARAM NAME="Size" VALUE="1905;2540">
  2212.     </OBJECT>
  2213.     <OBJECT ID="Stack3"
  2214.      CLASSID="CLSID:2B32FBC2-A8F1-11CF-93EE-00AA00C08FDF" STYLE="TOP:116pt;LEFT:239pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:17;">
  2215.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2216.         <PARAM NAME="Size" VALUE="1905;2540">
  2217.     </OBJECT>
  2218.     <OBJECT ID="Stack4"
  2219.      CLASSID="CLSID:2B32FBC2-A8F1-11CF-93EE-00AA00C08FDF" STYLE="TOP:116pt;LEFT:305pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:18;">
  2220.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2221.         <PARAM NAME="Size" VALUE="1905;2540">
  2222.     </OBJECT>
  2223.     <OBJECT ID="Stack5"
  2224.      CLASSID="CLSID:2B32FBC2-A8F1-11CF-93EE-00AA00C08FDF" STYLE="TOP:116pt;LEFT:371pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:19;">
  2225.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2226.         <PARAM NAME="Size" VALUE="1905;2540">
  2227.     </OBJECT>
  2228.     <OBJECT ID="Stack6"
  2229.      CLASSID="CLSID:2B32FBC2-A8F1-11CF-93EE-00AA00C08FDF" STYLE="TOP:116pt;LEFT:437pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:20;">
  2230.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2231.         <PARAM NAME="Size" VALUE="1905;2540">
  2232.     </OBJECT>
  2233.     <OBJECT ID="Stack7"
  2234.      CLASSID="CLSID:2B32FBC2-A8F1-11CF-93EE-00AA00C08FDF" STYLE="TOP:116pt;LEFT:503pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:21;">
  2235.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2236.         <PARAM NAME="Size" VALUE="1905;2540">
  2237.     </OBJECT>
  2238.     <OBJECT ID="Discard"
  2239.      CLASSID="CLSID:2B32FBC2-A8F1-11CF-93EE-00AA00C08FDF" STYLE="TOP:17pt;LEFT:99pt;WIDTH:74pt;HEIGHT:72pt;ZINDEX:22;">
  2240.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2241.         <PARAM NAME="Size" VALUE="2611;2540">
  2242.     </OBJECT>
  2243.     <OBJECT ID="Shuffle"
  2244.      CLASSID="CLSID:2B32FBC2-A8F1-11CF-93EE-00AA00C08FDF" STYLE="TOP:17pt;LEFT:25pt;WIDTH:54pt;HEIGHT:72pt;ZINDEX:23;">
  2245.         <PARAM NAME="VariousPropertyBits" VALUE="8388627">
  2246.         <PARAM NAME="Size" VALUE="1905;2540">
  2247.     </OBJECT>
  2248.     <OBJECT ID="tmEndCardMove"
  2249.      CLASSID="CLSID:59CCB4A0-727D-11CF-AC36-00AA00A47DD2" STYLE="TOP:454pt;LEFT:41pt;WIDTH:25pt;HEIGHT:17pt;TABINDEX:4;ZINDEX:24;">
  2250.         <PARAM NAME="_ExtentX" VALUE="873">
  2251.         <PARAM NAME="_ExtentY" VALUE="609">
  2252.     </OBJECT>
  2253.     <OBJECT ID="tmNewCard"
  2254.      CLASSID="CLSID:59CCB4A0-727D-11CF-AC36-00AA00A47DD2" STYLE="TOP:454pt;LEFT:74pt;WIDTH:25pt;HEIGHT:17pt;TABINDEX:44;ZINDEX:25;">
  2255.         <PARAM NAME="_ExtentX" VALUE="873">
  2256.         <PARAM NAME="_ExtentY" VALUE="609">
  2257.     </OBJECT>
  2258.     <OBJECT ID="HiddenCardLabel"
  2259.      CLASSID="CLSID:978C9E23-D4B0-11CE-BF2D-00AA003F40D0" STYLE="TOP:0pt;LEFT:512pt;WIDTH:107pt;HEIGHT:8pt;DISPLAY:NONE;ZINDEX:26;">
  2260.         <PARAM NAME="BackColor" VALUE="32768">
  2261.         <PARAM NAME="Caption" VALUE="All the cards are betwen this lable and the check box">
  2262.         <PARAM NAME="Size" VALUE="3775;282">
  2263.         <PARAM NAME="FontCharSet" VALUE="0">
  2264.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  2265.         <PARAM NAME="FontWeight" VALUE="0">
  2266.     </OBJECT>
  2267.     <OBJECT ID="chkDebug"
  2268.      CLASSID="CLSID:8BD21D40-EC42-11CE-9E0D-00AA006002F3" STYLE="TOP:0pt;LEFT:33pt;WIDTH:57pt;HEIGHT:12pt;TABINDEX:5;DISPLAY:NONE;ZINDEX:27;">
  2269.         <PARAM NAME="BackColor" VALUE="2000000000">
  2270.         <PARAM NAME="ForeColor" VALUE="100">
  2271.         <PARAM NAME="DisplayStyle" VALUE="4">
  2272.         <PARAM NAME="Size" VALUE="2011;423">
  2273.         <PARAM NAME="Caption" VALUE="Debug">
  2274.         <PARAM NAME="Accelerator" VALUE="68">
  2275.         <PARAM NAME="FontCharSet" VALUE="0">
  2276.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  2277.         <PARAM NAME="FontWeight" VALUE="0">
  2278.     </OBJECT>
  2279.     <OBJECT ID="cmdNewDeal"
  2280.      CLASSID="CLSID:D7053240-CE69-11CD-A777-00DD01143C57" STYLE="TOP:99pt;LEFT:4pt;WIDTH:76pt;HEIGHT:25pt;TABINDEX:6;ZINDEX:28;">
  2281.         <PARAM NAME="ForeColor" VALUE="0">
  2282.         <PARAM NAME="BackColor" VALUE="16777215">
  2283.         <PARAM NAME="Caption" VALUE="New Deal">
  2284.         <PARAM NAME="Size" VALUE="2681;882">
  2285.         <PARAM NAME="Accelerator" VALUE="78">
  2286.         <PARAM NAME="FontCharSet" VALUE="0">
  2287.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  2288.         <PARAM NAME="ParagraphAlign" VALUE="3">
  2289.         <PARAM NAME="FontWeight" VALUE="0">
  2290.     </OBJECT>
  2291.     <OBJECT ID="cmdNewDeck"
  2292.      CLASSID="CLSID:D7053240-CE69-11CD-A777-00DD01143C57" STYLE="TOP:133pt;LEFT:4pt;WIDTH:76pt;HEIGHT:25pt;TABINDEX:7;ZINDEX:29;">
  2293.         <PARAM NAME="ForeColor" VALUE="0">
  2294.         <PARAM NAME="BackColor" VALUE="16777215">
  2295.         <PARAM NAME="Caption" VALUE="Select New Deck">
  2296.         <PARAM NAME="Size" VALUE="2681;882">
  2297.         <PARAM NAME="Accelerator" VALUE="83">
  2298.         <PARAM NAME="FontCharSet" VALUE="0">
  2299.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  2300.         <PARAM NAME="ParagraphAlign" VALUE="3">
  2301.         <PARAM NAME="FontWeight" VALUE="0">
  2302.     </OBJECT>
  2303.     <OBJECT ID="cmdEndGame"
  2304.      CLASSID="CLSID:D7053240-CE69-11CD-A777-00DD01143C57" STYLE="TOP:166pt;LEFT:4pt;WIDTH:76pt;HEIGHT:25pt;TABINDEX:10;ZINDEX:30;">
  2305.         <PARAM NAME="ForeColor" VALUE="0">
  2306.         <PARAM NAME="BackColor" VALUE="16777215">
  2307.         <PARAM NAME="Caption" VALUE="End The Game">
  2308.         <PARAM NAME="Size" VALUE="2681;882">
  2309.         <PARAM NAME="Accelerator" VALUE="69">
  2310.         <PARAM NAME="FontCharSet" VALUE="0">
  2311.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  2312.         <PARAM NAME="ParagraphAlign" VALUE="3">
  2313.         <PARAM NAME="FontWeight" VALUE="0">
  2314.     </OBJECT>
  2315.     <OBJECT ID="cmdChangeDeal"
  2316.      CLASSID="CLSID:D7053240-CE69-11CD-A777-00DD01143C57" STYLE="TOP:199pt;LEFT:4pt;WIDTH:76pt;HEIGHT:25pt;TABINDEX:36;ZINDEX:31;">
  2317.         <PARAM NAME="ForeColor" VALUE="0">
  2318.         <PARAM NAME="BackColor" VALUE="16777215">
  2319.         <PARAM NAME="Caption" VALUE="Change to Draw 1">
  2320.         <PARAM NAME="Size" VALUE="2681;882">
  2321.         <PARAM NAME="Accelerator" VALUE="67">
  2322.         <PARAM NAME="FontCharSet" VALUE="0">
  2323.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  2324.         <PARAM NAME="ParagraphAlign" VALUE="3">
  2325.         <PARAM NAME="FontWeight" VALUE="0">
  2326.     </OBJECT>
  2327.     <OBJECT ID="Card2H"
  2328.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:215pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:11;ZINDEX:32;">
  2329.         <PARAM NAME="_ExtentX" VALUE="2037">
  2330.         <PARAM NAME="_ExtentY" VALUE="2619">
  2331.     </OBJECT>
  2332.     <OBJECT ID="Card3H"
  2333.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:272pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:12;ZINDEX:33;">
  2334.         <PARAM NAME="_ExtentX" VALUE="2037">
  2335.         <PARAM NAME="_ExtentY" VALUE="2619">
  2336.     </OBJECT>
  2337.     <OBJECT ID="Card4H"
  2338.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:157pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:13;ZINDEX:34;">
  2339.         <PARAM NAME="_ExtentX" VALUE="2037">
  2340.         <PARAM NAME="_ExtentY" VALUE="2619">
  2341.     </OBJECT>
  2342.     <OBJECT ID="Card5H"
  2343.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:223pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:14;ZINDEX:35;">
  2344.         <PARAM NAME="_ExtentX" VALUE="2037">
  2345.         <PARAM NAME="_ExtentY" VALUE="2619">
  2346.     </OBJECT>
  2347.     <OBJECT ID="Card6H"
  2348.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:281pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:15;ZINDEX:36;">
  2349.         <PARAM NAME="_ExtentX" VALUE="2037">
  2350.         <PARAM NAME="_ExtentY" VALUE="2619">
  2351.     </OBJECT>
  2352.     <OBJECT ID="Card7H"
  2353.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:165pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:16;ZINDEX:37;">
  2354.         <PARAM NAME="_ExtentX" VALUE="2037">
  2355.         <PARAM NAME="_ExtentY" VALUE="2619">
  2356.     </OBJECT>
  2357.     <OBJECT ID="Card8H"
  2358.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:231pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:17;ZINDEX:38;">
  2359.         <PARAM NAME="_ExtentX" VALUE="2037">
  2360.         <PARAM NAME="_ExtentY" VALUE="2619">
  2361.     </OBJECT>
  2362.     <OBJECT ID="Card9H"
  2363.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:289pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:18;ZINDEX:39;">
  2364.         <PARAM NAME="_ExtentX" VALUE="2037">
  2365.         <PARAM NAME="_ExtentY" VALUE="2619">
  2366.     </OBJECT>
  2367.     <OBJECT ID="Card10H"
  2368.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:173pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:19;ZINDEX:40;">
  2369.         <PARAM NAME="_ExtentX" VALUE="2037">
  2370.         <PARAM NAME="_ExtentY" VALUE="2619">
  2371.     </OBJECT>
  2372.     <OBJECT ID="Card11H"
  2373.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:239pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:20;ZINDEX:41;">
  2374.         <PARAM NAME="_ExtentX" VALUE="2037">
  2375.         <PARAM NAME="_ExtentY" VALUE="2619">
  2376.     </OBJECT>
  2377.     <OBJECT ID="Card12H"
  2378.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:297pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:21;ZINDEX:42;">
  2379.         <PARAM NAME="_ExtentX" VALUE="2037">
  2380.         <PARAM NAME="_ExtentY" VALUE="2619">
  2381.     </OBJECT>
  2382.     <OBJECT ID="Card13H"
  2383.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:165pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:22;ZINDEX:43;">
  2384.         <PARAM NAME="_ExtentX" VALUE="2037">
  2385.         <PARAM NAME="_ExtentY" VALUE="2619">
  2386.     </OBJECT>
  2387.     <OBJECT ID="Card1D"
  2388.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:231pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:23;ZINDEX:44;">
  2389.         <PARAM NAME="_ExtentX" VALUE="2037">
  2390.         <PARAM NAME="_ExtentY" VALUE="2619">
  2391.     </OBJECT>
  2392.     <OBJECT ID="Card2D"
  2393.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:289pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:24;ZINDEX:45;">
  2394.         <PARAM NAME="_ExtentX" VALUE="2037">
  2395.         <PARAM NAME="_ExtentY" VALUE="2619">
  2396.     </OBJECT>
  2397.     <OBJECT ID="Card3D"
  2398.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:173pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:25;ZINDEX:46;">
  2399.         <PARAM NAME="_ExtentX" VALUE="2037">
  2400.         <PARAM NAME="_ExtentY" VALUE="2619">
  2401.     </OBJECT>
  2402.     <OBJECT ID="Card4D"
  2403.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:239pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:26;ZINDEX:47;">
  2404.         <PARAM NAME="_ExtentX" VALUE="2037">
  2405.         <PARAM NAME="_ExtentY" VALUE="2619">
  2406.     </OBJECT>
  2407.     <OBJECT ID="Card5D"
  2408.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:297pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:27;ZINDEX:48;">
  2409.         <PARAM NAME="_ExtentX" VALUE="2037">
  2410.         <PARAM NAME="_ExtentY" VALUE="2619">
  2411.     </OBJECT>
  2412.     <OBJECT ID="Card6D"
  2413.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:182pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:28;ZINDEX:49;">
  2414.         <PARAM NAME="_ExtentX" VALUE="2037">
  2415.         <PARAM NAME="_ExtentY" VALUE="2619">
  2416.     </OBJECT>
  2417.     <OBJECT ID="Card7D"
  2418.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:248pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:29;ZINDEX:50;">
  2419.         <PARAM NAME="_ExtentX" VALUE="2037">
  2420.         <PARAM NAME="_ExtentY" VALUE="2619">
  2421.     </OBJECT>
  2422.     <OBJECT ID="Card8D"
  2423.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:305pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:30;ZINDEX:51;">
  2424.         <PARAM NAME="_ExtentX" VALUE="2037">
  2425.         <PARAM NAME="_ExtentY" VALUE="2619">
  2426.     </OBJECT>
  2427.     <OBJECT ID="Card9D"
  2428.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:190pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:31;ZINDEX:52;">
  2429.         <PARAM NAME="_ExtentX" VALUE="2037">
  2430.         <PARAM NAME="_ExtentY" VALUE="2619">
  2431.     </OBJECT>
  2432.     <OBJECT ID="Card10D"
  2433.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:256pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:32;ZINDEX:53;">
  2434.         <PARAM NAME="_ExtentX" VALUE="2037">
  2435.         <PARAM NAME="_ExtentY" VALUE="2619">
  2436.     </OBJECT>
  2437.     <OBJECT ID="Card11D"
  2438.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:33;ZINDEX:54;">
  2439.         <PARAM NAME="_ExtentX" VALUE="2037">
  2440.         <PARAM NAME="_ExtentY" VALUE="2619">
  2441.     </OBJECT>
  2442.     <OBJECT ID="Card12D"
  2443.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:37;ZINDEX:55;">
  2444.         <PARAM NAME="_ExtentX" VALUE="2037">
  2445.         <PARAM NAME="_ExtentY" VALUE="2619">
  2446.     </OBJECT>
  2447.     <OBJECT ID="Card13D"
  2448.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:42;ZINDEX:56;">
  2449.         <PARAM NAME="_ExtentX" VALUE="2037">
  2450.         <PARAM NAME="_ExtentY" VALUE="2619">
  2451.     </OBJECT>
  2452.     <OBJECT ID="Card1C"
  2453.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:46;ZINDEX:57;">
  2454.         <PARAM NAME="_ExtentX" VALUE="2037">
  2455.         <PARAM NAME="_ExtentY" VALUE="2619">
  2456.     </OBJECT>
  2457.     <OBJECT ID="Card2C"
  2458.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:47;ZINDEX:58;">
  2459.         <PARAM NAME="_ExtentX" VALUE="2037">
  2460.         <PARAM NAME="_ExtentY" VALUE="2619">
  2461.     </OBJECT>
  2462.     <OBJECT ID="Card3C"
  2463.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:50;ZINDEX:59;">
  2464.         <PARAM NAME="_ExtentX" VALUE="2037">
  2465.         <PARAM NAME="_ExtentY" VALUE="2619">
  2466.     </OBJECT>
  2467.     <OBJECT ID="Card4C"
  2468.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:51;ZINDEX:60;">
  2469.         <PARAM NAME="_ExtentX" VALUE="2037">
  2470.         <PARAM NAME="_ExtentY" VALUE="2619">
  2471.     </OBJECT>
  2472.     <OBJECT ID="Card5C"
  2473.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:55;ZINDEX:61;">
  2474.         <PARAM NAME="_ExtentX" VALUE="2037">
  2475.         <PARAM NAME="_ExtentY" VALUE="2619">
  2476.     </OBJECT>
  2477.     <OBJECT ID="Card6C"
  2478.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:56;ZINDEX:62;">
  2479.         <PARAM NAME="_ExtentX" VALUE="2037">
  2480.         <PARAM NAME="_ExtentY" VALUE="2619">
  2481.     </OBJECT>
  2482.     <OBJECT ID="Card7C"
  2483.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:59;ZINDEX:63;">
  2484.         <PARAM NAME="_ExtentX" VALUE="2037">
  2485.         <PARAM NAME="_ExtentY" VALUE="2619">
  2486.     </OBJECT>
  2487.     <OBJECT ID="Card8C"
  2488.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:60;ZINDEX:64;">
  2489.         <PARAM NAME="_ExtentX" VALUE="2037">
  2490.         <PARAM NAME="_ExtentY" VALUE="2619">
  2491.     </OBJECT>
  2492.     <OBJECT ID="Card9C"
  2493.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:66;ZINDEX:65;">
  2494.         <PARAM NAME="_ExtentX" VALUE="2037">
  2495.         <PARAM NAME="_ExtentY" VALUE="2619">
  2496.     </OBJECT>
  2497.     <OBJECT ID="Card10C"
  2498.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:68;ZINDEX:66;">
  2499.         <PARAM NAME="_ExtentX" VALUE="2037">
  2500.         <PARAM NAME="_ExtentY" VALUE="2619">
  2501.     </OBJECT>
  2502.     <OBJECT ID="Card11C"
  2503.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:76;ZINDEX:67;">
  2504.         <PARAM NAME="_ExtentX" VALUE="2037">
  2505.         <PARAM NAME="_ExtentY" VALUE="2619">
  2506.     </OBJECT>
  2507.     <OBJECT ID="Card12C"
  2508.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:80;ZINDEX:68;">
  2509.         <PARAM NAME="_ExtentX" VALUE="2037">
  2510.         <PARAM NAME="_ExtentY" VALUE="2619">
  2511.     </OBJECT>
  2512.     <OBJECT ID="Card13C"
  2513.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:86;ZINDEX:69;">
  2514.         <PARAM NAME="_ExtentX" VALUE="2037">
  2515.         <PARAM NAME="_ExtentY" VALUE="2619">
  2516.     </OBJECT>
  2517.     <OBJECT ID="Card1S"
  2518.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:88;ZINDEX:70;">
  2519.         <PARAM NAME="_ExtentX" VALUE="2037">
  2520.         <PARAM NAME="_ExtentY" VALUE="2619">
  2521.     </OBJECT>
  2522.     <OBJECT ID="Card2S"
  2523.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:91;ZINDEX:71;">
  2524.         <PARAM NAME="_ExtentX" VALUE="2037">
  2525.         <PARAM NAME="_ExtentY" VALUE="2619">
  2526.     </OBJECT>
  2527.     <OBJECT ID="Card3S"
  2528.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:92;ZINDEX:72;">
  2529.         <PARAM NAME="_ExtentX" VALUE="2037">
  2530.         <PARAM NAME="_ExtentY" VALUE="2619">
  2531.     </OBJECT>
  2532.     <OBJECT ID="Card4S"
  2533.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:90;ZINDEX:73;">
  2534.         <PARAM NAME="_ExtentX" VALUE="2037">
  2535.         <PARAM NAME="_ExtentY" VALUE="2619">
  2536.     </OBJECT>
  2537.     <OBJECT ID="Card5S"
  2538.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:82;ZINDEX:74;">
  2539.         <PARAM NAME="_ExtentX" VALUE="2037">
  2540.         <PARAM NAME="_ExtentY" VALUE="2619">
  2541.     </OBJECT>
  2542.     <OBJECT ID="Card6S"
  2543.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:70;ZINDEX:75;">
  2544.         <PARAM NAME="_ExtentX" VALUE="2037">
  2545.         <PARAM NAME="_ExtentY" VALUE="2619">
  2546.     </OBJECT>
  2547.     <OBJECT ID="Card7S"
  2548.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:61;ZINDEX:76;">
  2549.         <PARAM NAME="_ExtentX" VALUE="2037">
  2550.         <PARAM NAME="_ExtentY" VALUE="2619">
  2551.     </OBJECT>
  2552.     <OBJECT ID="Card8S"
  2553.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:57;ZINDEX:77;">
  2554.         <PARAM NAME="_ExtentX" VALUE="2037">
  2555.         <PARAM NAME="_ExtentY" VALUE="2619">
  2556.     </OBJECT>
  2557.     <OBJECT ID="Card9S"
  2558.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:52;ZINDEX:78;">
  2559.         <PARAM NAME="_ExtentX" VALUE="2037">
  2560.         <PARAM NAME="_ExtentY" VALUE="2619">
  2561.     </OBJECT>
  2562.     <OBJECT ID="Card10S"
  2563.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:48;ZINDEX:79;">
  2564.         <PARAM NAME="_ExtentX" VALUE="2037">
  2565.         <PARAM NAME="_ExtentY" VALUE="2619">
  2566.     </OBJECT>
  2567.     <OBJECT ID="Card11S"
  2568.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:43;ZINDEX:80;">
  2569.         <PARAM NAME="_ExtentX" VALUE="2037">
  2570.         <PARAM NAME="_ExtentY" VALUE="2619">
  2571.     </OBJECT>
  2572.     <OBJECT ID="Card12S"
  2573.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:38;ZINDEX:81;">
  2574.         <PARAM NAME="_ExtentX" VALUE="2037">
  2575.         <PARAM NAME="_ExtentY" VALUE="2619">
  2576.     </OBJECT>
  2577.     <OBJECT ID="Card13S"
  2578.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:-41pt;LEFT:314pt;WIDTH:54pt;HEIGHT:72pt;TABINDEX:34;ZINDEX:82;">
  2579.         <PARAM NAME="_ExtentX" VALUE="2037">
  2580.         <PARAM NAME="_ExtentY" VALUE="2619">
  2581.     </OBJECT>
  2582.     <OBJECT ID="CardDeck1"
  2583.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:91pt;LEFT:91pt;WIDTH:58pt;HEIGHT:74pt;TABINDEX:63;DISPLAY:NONE;ZINDEX:83;">
  2584.         <PARAM NAME="_ExtentX" VALUE="2037">
  2585.         <PARAM NAME="_ExtentY" VALUE="2619">
  2586.         <PARAM NAME="Suite" VALUE="-1">
  2587.     </OBJECT>
  2588.     <OBJECT ID="CardDeck2"
  2589.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:91pt;LEFT:157pt;WIDTH:58pt;HEIGHT:74pt;TABINDEX:65;DISPLAY:NONE;ZINDEX:84;">
  2590.         <PARAM NAME="_ExtentX" VALUE="2037">
  2591.         <PARAM NAME="_ExtentY" VALUE="2619">
  2592.         <PARAM NAME="Suite" VALUE="-2">
  2593.     </OBJECT>
  2594.     <OBJECT ID="CardDeck3"
  2595.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:91pt;LEFT:223pt;WIDTH:58pt;HEIGHT:74pt;TABINDEX:67;DISPLAY:NONE;ZINDEX:85;">
  2596.         <PARAM NAME="_ExtentX" VALUE="2037">
  2597.         <PARAM NAME="_ExtentY" VALUE="2619">
  2598.         <PARAM NAME="Suite" VALUE="-3">
  2599.     </OBJECT>
  2600.     <OBJECT ID="CardDeck4"
  2601.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:91pt;LEFT:289pt;WIDTH:58pt;HEIGHT:74pt;TABINDEX:69;DISPLAY:NONE;ZINDEX:86;">
  2602.         <PARAM NAME="_ExtentX" VALUE="2037">
  2603.         <PARAM NAME="_ExtentY" VALUE="2619">
  2604.         <PARAM NAME="Suite" VALUE="-4">
  2605.     </OBJECT>
  2606.     <OBJECT ID="CardDeck5"
  2607.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:91pt;LEFT:355pt;WIDTH:58pt;HEIGHT:74pt;TABINDEX:71;DISPLAY:NONE;ZINDEX:87;">
  2608.         <PARAM NAME="_ExtentX" VALUE="2037">
  2609.         <PARAM NAME="_ExtentY" VALUE="2619">
  2610.         <PARAM NAME="Suite" VALUE="-5">
  2611.     </OBJECT>
  2612.     <OBJECT ID="CardDeck6"
  2613.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:91pt;LEFT:421pt;WIDTH:58pt;HEIGHT:74pt;TABINDEX:73;DISPLAY:NONE;ZINDEX:88;">
  2614.         <PARAM NAME="_ExtentX" VALUE="2037">
  2615.         <PARAM NAME="_ExtentY" VALUE="2619">
  2616.         <PARAM NAME="Suite" VALUE="-6">
  2617.     </OBJECT>
  2618.     <OBJECT ID="CardDeck7"
  2619.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:173pt;LEFT:91pt;WIDTH:58pt;HEIGHT:74pt;TABINDEX:75;DISPLAY:NONE;ZINDEX:89;">
  2620.         <PARAM NAME="_ExtentX" VALUE="2037">
  2621.         <PARAM NAME="_ExtentY" VALUE="2619">
  2622.         <PARAM NAME="Suite" VALUE="-7">
  2623.     </OBJECT>
  2624.     <OBJECT ID="CardDeck8"
  2625.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:173pt;LEFT:157pt;WIDTH:58pt;HEIGHT:74pt;TABINDEX:77;DISPLAY:NONE;ZINDEX:90;">
  2626.         <PARAM NAME="_ExtentX" VALUE="2037">
  2627.         <PARAM NAME="_ExtentY" VALUE="2619">
  2628.         <PARAM NAME="Suite" VALUE="-8">
  2629.     </OBJECT>
  2630.     <OBJECT ID="CardDeck9"
  2631.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:173pt;LEFT:223pt;WIDTH:58pt;HEIGHT:74pt;TABINDEX:79;DISPLAY:NONE;ZINDEX:91;">
  2632.         <PARAM NAME="_ExtentX" VALUE="2037">
  2633.         <PARAM NAME="_ExtentY" VALUE="2619">
  2634.         <PARAM NAME="Suite" VALUE="-9">
  2635.     </OBJECT>
  2636.     <OBJECT ID="CardDeck10"
  2637.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:173pt;LEFT:289pt;WIDTH:58pt;HEIGHT:74pt;TABINDEX:81;DISPLAY:NONE;ZINDEX:92;">
  2638.         <PARAM NAME="_ExtentX" VALUE="2037">
  2639.         <PARAM NAME="_ExtentY" VALUE="2619">
  2640.         <PARAM NAME="Suite" VALUE="-10">
  2641.     </OBJECT>
  2642.     <OBJECT ID="CardDeck11"
  2643.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:173pt;LEFT:355pt;WIDTH:58pt;HEIGHT:74pt;TABINDEX:83;DISPLAY:NONE;ZINDEX:93;">
  2644.         <PARAM NAME="_ExtentX" VALUE="2037">
  2645.         <PARAM NAME="_ExtentY" VALUE="2619">
  2646.         <PARAM NAME="Suite" VALUE="-11">
  2647.     </OBJECT>
  2648.     <OBJECT ID="CardDeck12"
  2649.      CLASSID="CLSID:5A73F48A-B702-11CF-8498-00AA00BBF311" STYLE="TOP:173pt;LEFT:421pt;WIDTH:58pt;HEIGHT:74pt;TABINDEX:85;DISPLAY:NONE;ZINDEX:94;">
  2650.         <PARAM NAME="_ExtentX" VALUE="2037">
  2651.         <PARAM NAME="_ExtentY" VALUE="2619">
  2652.         <PARAM NAME="Suite" VALUE="-12">
  2653.     </OBJECT>
  2654.     <OBJECT ID="CardDeckOk"
  2655.      CLASSID="CLSID:D7053240-CE69-11CD-A777-00DD01143C57" STYLE="TOP:264pt;LEFT:182pt;WIDTH:91pt;HEIGHT:25pt;TABINDEX:87;DISPLAY:NONE;ZINDEX:95;">
  2656.         <PARAM NAME="Caption" VALUE="Ok">
  2657.         <PARAM NAME="Size" VALUE="3210;882">
  2658.         <PARAM NAME="Accelerator" VALUE="79">
  2659.         <PARAM NAME="FontCharSet" VALUE="0">
  2660.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  2661.         <PARAM NAME="ParagraphAlign" VALUE="3">
  2662.         <PARAM NAME="FontWeight" VALUE="0">
  2663.     </OBJECT>
  2664.     <OBJECT ID="CardDeckCancel"
  2665.      CLASSID="CLSID:D7053240-CE69-11CD-A777-00DD01143C57" STYLE="TOP:264pt;LEFT:297pt;WIDTH:91pt;HEIGHT:25pt;TABINDEX:89;DISPLAY:NONE;ZINDEX:96;">
  2666.         <PARAM NAME="Caption" VALUE="Cancel">
  2667.         <PARAM NAME="Size" VALUE="3210;882">
  2668.         <PARAM NAME="Accelerator" VALUE="67">
  2669.         <PARAM NAME="FontCharSet" VALUE="0">
  2670.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  2671.         <PARAM NAME="ParagraphAlign" VALUE="3">
  2672.         <PARAM NAME="FontWeight" VALUE="0">
  2673.     </OBJECT>
  2674.     <OBJECT ID="lstDebugPrint"
  2675.      CLASSID="CLSID:8BD21D20-EC42-11CE-9E0D-00AA006002F3" STYLE="TOP:8pt;LEFT:157pt;WIDTH:122pt;HEIGHT:66pt;TABINDEX:9;DISPLAY:NONE;ZINDEX:97;">
  2676.         <PARAM NAME="BackColor" VALUE="16777215">
  2677.         <PARAM NAME="ScrollBars" VALUE="3">
  2678.         <PARAM NAME="DisplayStyle" VALUE="2">
  2679.         <PARAM NAME="Size" VALUE="4304;2328">
  2680.         <PARAM NAME="MatchEntry" VALUE="0">
  2681.         <PARAM NAME="FontCharSet" VALUE="0">
  2682.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  2683.         <PARAM NAME="FontWeight" VALUE="0">
  2684.     </OBJECT>
  2685. </DIV>
  2686.